diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/Az.FirmwareAnalysis.format.ps1xml b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/Az.FirmwareAnalysis.format.ps1xml index 1d5a76ec45c6..fcd09b05fbae 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/Az.FirmwareAnalysis.format.ps1xml +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/Az.FirmwareAnalysis.format.ps1xml @@ -2,45 +2,45 @@ - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningFeatures + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.AzureResourceManagerCommonTypesSkuUpdate - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningFeatures#Multiple + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.AzureResourceManagerCommonTypesSkuUpdate#Multiple - + - + - + - + - + - Canary + Capacity - Nx + Family - Pie + Name - Relro + Size - Stripped + Tier @@ -48,21 +48,45 @@ - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningListResult + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningFeatures - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningListResult#Multiple + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningFeatures#Multiple - + + + + + + + + + + + + + - NextLink + Canary + + + NoExecute + + + PositionIndependentExecutable + + + RelocationReadOnly + + + Stripped @@ -127,6 +151,28 @@ + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningResourceListResult + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningResourceListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningResult @@ -135,17 +181,20 @@ - + - + - + + + + @@ -157,17 +206,20 @@ - Architecture + BinaryHardeningId - BinaryHardeningId + ExecutableArchitecture - Class + ExecutableClass FilePath + + ProvisioningState + Rpath @@ -186,23 +238,26 @@ + + + - + - + - + - + - + @@ -211,23 +266,26 @@ + + ProvisioningState + SummaryType - Canary + NotExecutableStackCount - Nx + PositionIndependentExecutableCount - Pie + RelocationReadOnlyCount - Relro + StackCanaryCount - Stripped + StrippedBinaryCount TotalFile @@ -244,6 +302,18 @@ + + + + + + + + + + + + @@ -272,16 +342,7 @@ - - - - - - - - - - + @@ -293,6 +354,18 @@ + + CertificateKeyAlgorithm + + + CertificateKeySize + + + CertificateName + + + CertificateRole + CryptoCertId @@ -321,16 +394,7 @@ IssuedDate - KeyAlgorithm - - - KeySize - - - Name - - - Role + ProvisioningState SerialNumber @@ -389,28 +453,6 @@ - - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificateListResult - - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificateListResult#Multiple - - - - - - - - - - - - NextLink - - - - - - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificateResource @@ -469,6 +511,28 @@ + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificateResourceListResult + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificateResourceListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificateSummaryResource @@ -476,57 +540,63 @@ + + + - + - + - + - + - + - + - + + + ProvisioningState + SummaryType - Expired + ExpiredCertificateCount - ExpiringSoon + ExpiringSoonCertificateCount - PairedKey + PairedKeyCount - SelfSigned + SelfSignedCertificateCount - ShortKeySize + ShortKeySizeCount - TotalCertificate + TotalCertificateCount - WeakSignature + WeakSignatureCount @@ -547,10 +617,13 @@ - + - + + + + @@ -563,32 +636,13 @@ KeyAlgorithm - KeySize + KeyType - KeyType + ProvisioningState - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoKeyListResult - - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoKeyListResult#Multiple - - - - - - - - - - - NextLink + Size @@ -653,6 +707,28 @@ + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoKeyResourceListResult + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoKeyResourceListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoKeySummaryResource @@ -660,45 +736,51 @@ + + + - + - + - + - + - + + + ProvisioningState + SummaryType - PairedKey + PairedKeyCount - PrivateKey + PrivateKeyCount - PublicKey + PublicKeyCount - ShortKeySize + ShortKeySizeCount - TotalKey + TotalKeyCount @@ -767,28 +849,6 @@ - - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveListResult - - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveListResult#Multiple - - - - - - - - - - - - NextLink - - - - - - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveResource @@ -847,6 +907,28 @@ + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveResourceListResult + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveResourceListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveResult @@ -854,9 +936,21 @@ + + + + + + + + + + + + @@ -873,18 +967,36 @@ - + - + + + + + + + + + ComponentId + + + ComponentName + + + ComponentVersion + CveId + + CveName + CvssScore @@ -901,7 +1013,13 @@ Description - Name + EffectiveCvssScore + + + EffectiveCvssVersion + + + ProvisioningState Severity @@ -918,45 +1036,79 @@ + + + - + - + - + - + - + + + ProvisioningState + SummaryType - Critical + CriticalCveCount - High + HighCveCount - Low + LowCveCount - Medium + MediumCveCount - Unknown + UnknownCveCount + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CvssScore + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CvssScore#Multiple + + + + + + + + + + + + + + + Score + + + Version @@ -1071,6 +1223,9 @@ + + + @@ -1078,7 +1233,7 @@ - + @@ -1090,6 +1245,9 @@ FirmwareId + + Name + ResourceGroupName @@ -1097,7 +1255,7 @@ SubscriptionId - SummaryName + SummaryType WorkspaceName @@ -1108,9 +1266,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareList + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareListResult - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareList#Multiple + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareListResult#Multiple @@ -1200,6 +1358,9 @@ + + + @@ -1228,6 +1389,9 @@ + + ProvisioningState + SummaryType @@ -1400,6 +1564,9 @@ + + + @@ -1422,6 +1589,9 @@ Hash + + ProvisioningState + Salt @@ -1434,9 +1604,67 @@ - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PasswordHashListResult + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PasswordHashResource + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PasswordHashResource#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PasswordHashResourceListResult - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PasswordHashListResult#Multiple + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PasswordHashResourceListResult#Multiple @@ -1456,9 +1684,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PasswordHashResource + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PasswordHashResource#Multiple + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource#Multiple @@ -1551,6 +1779,9 @@ + + + @@ -1568,29 +1799,10 @@ License - Version + ProvisioningState - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SbomComponentListResult - - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SbomComponentListResult#Multiple - - - - - - - - - - - NextLink + Version @@ -1656,27 +1868,67 @@ - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.StatusMessage + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SbomComponentResourceListResult - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.StatusMessage#Multiple + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SbomComponentResourceListResult#Multiple - + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Sku + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Sku#Multiple + + + - + + + + + + + + + + + + + - ErrorCode + Capacity - Message + Family + + + Name + + + Size + + + Tier @@ -1684,21 +1936,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryListResult + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.StatusMessage - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryListResult#Multiple + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.StatusMessage#Multiple - + + + + - NextLink + ErrorCode + + + Message @@ -1769,6 +2027,28 @@ + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceListResult + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceProperties @@ -1776,6 +2056,9 @@ + + + @@ -1783,6 +2066,9 @@ + + ProvisioningState + SummaryType @@ -1951,6 +2237,126 @@ + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UsageMetric + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UsageMetric#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UsageMetricListResult + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UsageMetricListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UsageMetricProperties + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UsageMetricProperties#Multiple + + + + + + + + + + + + + + + + + + MonthlyFirmwareUploadCount + + + ProvisioningState + + + TotalFirmwareCount + + + + + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Workspace @@ -2022,9 +2428,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceList + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceListResult - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceList#Multiple + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceListResult#Multiple @@ -2065,5 +2471,27 @@ + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceUpdateTags + + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceUpdateTags#Multiple + + + + + + + + + + + + Item + + + + + + \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/Az.FirmwareAnalysis.psd1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/Az.FirmwareAnalysis.psd1 index 7cfc7e3ff254..ec83eb55f5a9 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/Az.FirmwareAnalysis.psd1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/Az.FirmwareAnalysis.psd1 @@ -1,7 +1,7 @@ @{ GUID = 'e097ff3f-acb2-48da-86fe-937d86006ea5' RootModule = './Az.FirmwareAnalysis.psm1' - ModuleVersion = '0.1.0' + ModuleVersion = '0.2.0' CompatiblePSEditions = 'Core', 'Desktop' Author = 'Microsoft Corporation' CompanyName = 'Microsoft Corporation' @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.FirmwareAnalysis.private.dll' FormatsToProcess = './Az.FirmwareAnalysis.format.ps1xml' - FunctionsToExport = 'Get-AzFirmwareAnalysisBinaryHardening', 'Get-AzFirmwareAnalysisCryptoCertificate', 'Get-AzFirmwareAnalysisCryptoKey', 'Get-AzFirmwareAnalysisCve', 'Get-AzFirmwareAnalysisFirmware', 'Get-AzFirmwareAnalysisPasswordHash', 'Get-AzFirmwareAnalysisSbomComponent', 'Get-AzFirmwareAnalysisSummary', 'Get-AzFirmwareAnalysisWorkspace', 'New-AzFirmwareAnalysisFirmware', 'New-AzFirmwareAnalysisWorkspace', 'New-AzFirmwareAnalysisWorkspaceUploadUrl', 'Remove-AzFirmwareAnalysisFirmware', 'Remove-AzFirmwareAnalysisWorkspace', 'Update-AzFirmwareAnalysisFirmware', 'Update-AzFirmwareAnalysisWorkspace' + FunctionsToExport = 'Get-AzFirmwareAnalysisBinaryHardening', 'Get-AzFirmwareAnalysisCryptoCertificate', 'Get-AzFirmwareAnalysisCryptoKey', 'Get-AzFirmwareAnalysisCve', 'Get-AzFirmwareAnalysisFirmware', 'Get-AzFirmwareAnalysisPasswordHash', 'Get-AzFirmwareAnalysisSbomComponent', 'Get-AzFirmwareAnalysisSummary', 'Get-AzFirmwareAnalysisUsageMetric', 'Get-AzFirmwareAnalysisWorkspace', 'New-AzFirmwareAnalysisFirmware', 'New-AzFirmwareAnalysisWorkspace', 'New-AzFirmwareAnalysisWorkspaceUploadUrl', 'Remove-AzFirmwareAnalysisFirmware', 'Remove-AzFirmwareAnalysisWorkspace', 'Update-AzFirmwareAnalysisFirmware', 'Update-AzFirmwareAnalysisWorkspace' PrivateData = @{ PSData = @{ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'FirmwareAnalysis' diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/Properties/AssemblyInfo.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/Properties/AssemblyInfo.cs index b1c05ff618c3..3753964097f2 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/Properties/AssemblyInfo.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/Properties/AssemblyInfo.cs @@ -1,28 +1,27 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); +// 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, +// 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. using System; using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -[assembly: AssemblyTitle("Microsoft Azure Powershell - FirmwareAnalysis")] -[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] -[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] -[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] +[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")] +[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")] +[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")] +[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - FirmwareAnalysis")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.4")] +[assembly: System.Reflection.AssemblyVersionAttribute("0.1.4")] +[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] +[assembly: System.CLSCompliantAttribute(false)] -[assembly: ComVisible(false)] -[assembly: CLSCompliant(false)] -[assembly: Guid("ef6bdf0c-8d39-428c-b222-9f9675d964d6")] -[assembly: AssemblyVersion("0.1.4")] -[assembly: AssemblyFileVersion("0.1.4")] diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisBinaryHardening.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisBinaryHardening.ps1 index a43dd9bf1acc..c924e20cb2e7 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisBinaryHardening.ps1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisBinaryHardening.ps1 @@ -114,6 +114,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -136,8 +145,6 @@ begin { List = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisBinaryHardening_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -151,6 +158,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisCryptoCertificate.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisCryptoCertificate.ps1 index 7344e42247f4..abf3f822adc6 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisCryptoCertificate.ps1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisCryptoCertificate.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Lists cryptographic certificate analysis results found in a firmware. +Lists crypto certificate analysis results of a firmware. .Description -Lists cryptographic certificate analysis results found in a firmware. +Lists crypto certificate analysis results of a firmware. .Example Get-AzFirmwareAnalysisCryptoCertificate -FirmwareId FirmwareId -ResourceGroupName ResourceGroupName -WorkspaceName WorkspaceName | ConvertTo-Json @@ -114,6 +114,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -136,8 +145,6 @@ begin { List = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisCryptoCertificate_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -151,6 +158,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisCryptoKey.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisCryptoKey.ps1 index b572e8fb0a88..b65994b3a6e6 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisCryptoKey.ps1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisCryptoKey.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Lists cryptographic key analysis results found in a firmware. +Lists crypto key analysis results of a firmware. .Description -Lists cryptographic key analysis results found in a firmware. +Lists crypto key analysis results of a firmware. .Example Get-AzFirmwareAnalysisCryptoKey -FirmwareId FirmwareId -ResourceGroupName ResourceGroupName -WorkspaceName WorkspaceName | ConvertTo-Json @@ -114,6 +114,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -136,8 +145,6 @@ begin { List = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisCryptoKey_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -151,6 +158,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisCve.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisCve.ps1 index 7695e37e4d7b..c2c51c8ca43d 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisCve.ps1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisCve.ps1 @@ -114,6 +114,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -136,8 +145,6 @@ begin { List = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisCve_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -151,6 +158,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisFirmware.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisFirmware.ps1 index 82f6f580f6cd..80b94fcdd809 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisFirmware.ps1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisFirmware.ps1 @@ -36,17 +36,19 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. WORKSPACEINPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. .Link https://learn.microsoft.com/powershell/module/az.firmwareanalysis/get-azfirmwareanalysisfirmware @@ -155,6 +157,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -180,8 +191,6 @@ begin { List = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisFirmware_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -195,6 +204,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisPasswordHash.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisPasswordHash.ps1 index c2cfce662610..573bbacf60af 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisPasswordHash.ps1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisPasswordHash.ps1 @@ -114,6 +114,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -136,8 +145,6 @@ begin { List = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisPasswordHash_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -151,6 +158,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisSbomComponent.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisSbomComponent.ps1 index 8784dedc3aaf..30640013287c 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisSbomComponent.ps1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisSbomComponent.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Lists SBOM analysis results of a firmware. +Lists sbom analysis results of a firmware. .Description -Lists SBOM analysis results of a firmware. +Lists sbom analysis results of a firmware. .Example Get-AzFirmwareAnalysisSbomComponent -FirmwareId FirmwareId -ResourceGroupName ResourceGroupName -WorkspaceName WorkspaceName | ConvertTo-Json @@ -114,6 +114,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -136,8 +145,6 @@ begin { List = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisSbomComponent_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -151,6 +158,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisSummary.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisSummary.ps1 index 9d62fd4b59f8..0db965c31a07 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisSummary.ps1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisSummary.ps1 @@ -20,9 +20,9 @@ Get an analysis result summary of a firmware by name. .Description Get an analysis result summary of a firmware by name. .Example -Get-AzFirmwareAnalysisSummary -FirmwareId FirmwareId -ResourceGroupName ResourceGroupName -WorkspaceName WorkspaceName -Name Type +Get-AzFirmwareAnalysisSummary -FirmwareId FirmwareId -ResourceGroupName ResourceGroupName -WorkspaceName WorkspaceName -Type CVE .Example -Get-AzFirmwareAnalysisSummary -FirmwareId FirmwareId -ResourceGroupName ResourceGroupName -WorkspaceName WorkspaceName -Name Type +Get-AzFirmwareAnalysisSummary -FirmwareId FirmwareId -ResourceGroupName ResourceGroupName -WorkspaceName WorkspaceName -Type Firmware .Inputs Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentity @@ -36,25 +36,28 @@ To create the parameters described below, construct a hash table containing the FIRMWAREINPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. INPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. WORKSPACEINPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. .Link https://learn.microsoft.com/powershell/module/az.firmwareanalysis/get-azfirmwareanalysissummary @@ -70,16 +73,6 @@ param( # The id of the firmware. ${FirmwareId}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityFirmware', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityWorkspace', Mandatory)] - [Alias('SummaryName')] - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CVE", "BinaryHardening", "CryptoCertificate", "CryptoKey")] - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] - [System.String] - # The Firmware analysis summary name describing the type of summary. - ${Name}, - [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] [System.String] @@ -95,6 +88,16 @@ param( # The value must be an UUID. ${SubscriptionId}, + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityFirmware', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityWorkspace', Mandatory)] + [Alias('SummaryType')] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CommonVulnerabilitiesAndExposures", "BinaryHardening", "CryptoCertificate", "CryptoKey")] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] + [System.String] + # The Firmware analysis summary name describing the type of summary. + ${Type}, + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] [System.String] @@ -175,6 +178,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -200,8 +212,6 @@ begin { GetViaIdentityWorkspace = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisSummary_GetViaIdentityWorkspace'; } if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -215,6 +225,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisUsageMetric.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisUsageMetric.ps1 new file mode 100644 index 000000000000..c12c78bc3038 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisUsageMetric.ps1 @@ -0,0 +1,248 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Gets monthly usage information for a workspace. +.Description +Gets monthly usage information for a workspace. +.Example +Get-AzFirmwareAnalysisUsageMetric -ResourceGroupName FirmwareAnalysisRG -WorkspaceName default + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetric +.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 + [FirmwareId ]: The id of the firmware. + [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. + [WorkspaceName ]: The name of the firmware analysis workspace. + +WORKSPACEINPUTOBJECT : Identity Parameter + [FirmwareId ]: The id of the firmware. + [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. + [WorkspaceName ]: The name of the firmware analysis workspace. +.Link +https://learn.microsoft.com/powershell/module/az.firmwareanalysis/get-azfirmwareanalysisusagemetric +#> +function Get-AzFirmwareAnalysisUsageMetric { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetric])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityWorkspace', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] + [System.String] + # The Firmware analysis summary name describing the type of summary. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] + [System.String] + # The name of the firmware analysis workspace. + ${WorkspaceName}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityWorkspace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentity] + # Identity Parameter + ${WorkspaceInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + 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.FirmwareAnalysis.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.FirmwareAnalysis.private\Get-AzFirmwareAnalysisUsageMetric_Get'; + GetViaIdentity = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisUsageMetric_GetViaIdentity'; + GetViaIdentityWorkspace = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisUsageMetric_GetViaIdentityWorkspace'; + List = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisUsageMetric_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.FirmwareAnalysis.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/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisWorkspace.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisWorkspace.ps1 index 75780e222844..92da0af51c2e 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisWorkspace.ps1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Get-AzFirmwareAnalysisWorkspace.ps1 @@ -36,9 +36,10 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. .Link https://learn.microsoft.com/powershell/module/az.firmwareanalysis/get-azfirmwareanalysisworkspace @@ -134,6 +135,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -159,8 +169,6 @@ begin { List1 = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisWorkspace_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -174,6 +182,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/New-AzFirmwareAnalysisFirmware.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/New-AzFirmwareAnalysisFirmware.ps1 index 7f08d7ab86c7..9bcb3b0df603 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/New-AzFirmwareAnalysisFirmware.ps1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/New-AzFirmwareAnalysisFirmware.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -The operation to Create a firmware. +The operation to create a firmware. .Description -The operation to Create a firmware. +The operation to create a firmware. .Example New-AzFirmwareAnalysisFirmware -ResourceGroupName resourceGroupName -WorkspaceName workspaceName -Description description -FileSize 1 -FileName fileName -Vendor vendor -Model model -Version version .Example @@ -176,6 +176,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -201,8 +210,6 @@ begin { $PSBoundParameters['Id'] = New-Guid } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -216,6 +223,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/New-AzFirmwareAnalysisWorkspace.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/New-AzFirmwareAnalysisWorkspace.ps1 index ea4b30da94f0..297932357d84 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/New-AzFirmwareAnalysisWorkspace.ps1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/New-AzFirmwareAnalysisWorkspace.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -The operation to Create a firmware analysis workspace. +The operation to create a firmware analysis workspace. .Description -The operation to Create a firmware analysis workspace. +The operation to create a firmware analysis workspace. .Example New-AzFirmwareAnalysisWorkspace -ResourceGroupName resourceGroupName -Name name -Location location @@ -59,6 +59,42 @@ param( # The geo-location where the resource lives ${Location}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.Int32] + # If the SKU supports scale out/in then the capacity integer should be included. + # If scale out/in is not possible for the resource this may be omitted. + ${SkuCapacity}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.String] + # If the service has different generations of hardware, for the same SKU, then that can be captured here. + ${SkuFamily}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.String] + # The name of the SKU. + # E.g. + # P3. + # It is typically a letter+number code + ${SkuName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.String] + # The SKU size. + # When the name field is the combination of tier and some other value, this would be the standalone code. + ${SkuSize}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Free", "Basic", "Standard", "Premium")] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.String] + # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + ${SkuTier}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ITrackedResourceTags]))] @@ -122,6 +158,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -144,8 +189,6 @@ begin { CreateExpanded = 'Az.FirmwareAnalysis.private\New-AzFirmwareAnalysisWorkspace_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -159,6 +202,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/New-AzFirmwareAnalysisWorkspaceUploadUrl.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/New-AzFirmwareAnalysisWorkspaceUploadUrl.ps1 index 2f7d85fef0d4..53291a2d9147 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/New-AzFirmwareAnalysisWorkspaceUploadUrl.ps1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/New-AzFirmwareAnalysisWorkspaceUploadUrl.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -The operation to get a url for file upload. +Generate a URL for uploading a firmware image. .Description -The operation to get a url for file upload. +Generate a URL for uploading a firmware image. .Example New-AzFirmwareAnalysisWorkspaceUploadUrl -ResourceGroupName resourceGroupName -WorkspaceName workspaceName -FirmwareId firmwareId @@ -33,15 +33,16 @@ 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. -GENERATEUPLOADURL : Properties for generating an upload URL +BODY : Properties for generating an upload URL [FirmwareId ]: A unique ID for the firmware to be uploaded. INPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. .Link https://learn.microsoft.com/powershell/module/az.firmwareanalysis/new-azfirmwareanalysisworkspaceuploadurl @@ -92,7 +93,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest] # Properties for generating an upload URL - ${GenerateUploadUrl}, + ${Body}, [Parameter(ParameterSetName='GenerateExpanded')] [Parameter(ParameterSetName='GenerateViaIdentityExpanded')] @@ -169,6 +170,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -196,8 +206,6 @@ begin { GenerateViaJsonString = 'Az.FirmwareAnalysis.private\New-AzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaJsonString'; } if (('Generate', 'GenerateExpanded', 'GenerateViaJsonFilePath', 'GenerateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -211,6 +219,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/ProxyCmdletDefinitions.ps1 index 5a62f6a55148..538c960d8604 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -114,6 +114,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -136,8 +145,6 @@ begin { List = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisBinaryHardening_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -151,6 +158,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -196,9 +206,9 @@ end { <# .Synopsis -Lists cryptographic certificate analysis results found in a firmware. +Lists crypto certificate analysis results of a firmware. .Description -Lists cryptographic certificate analysis results found in a firmware. +Lists crypto certificate analysis results of a firmware. .Example Get-AzFirmwareAnalysisCryptoCertificate -FirmwareId FirmwareId -ResourceGroupName ResourceGroupName -WorkspaceName WorkspaceName | ConvertTo-Json @@ -294,6 +304,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -316,8 +335,6 @@ begin { List = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisCryptoCertificate_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -331,6 +348,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -376,9 +396,9 @@ end { <# .Synopsis -Lists cryptographic key analysis results found in a firmware. +Lists crypto key analysis results of a firmware. .Description -Lists cryptographic key analysis results found in a firmware. +Lists crypto key analysis results of a firmware. .Example Get-AzFirmwareAnalysisCryptoKey -FirmwareId FirmwareId -ResourceGroupName ResourceGroupName -WorkspaceName WorkspaceName | ConvertTo-Json @@ -474,6 +494,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -496,8 +525,6 @@ begin { List = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisCryptoKey_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -511,6 +538,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -654,6 +684,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -676,8 +715,6 @@ begin { List = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisCve_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -691,6 +728,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -756,17 +796,19 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. WORKSPACEINPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. .Link https://learn.microsoft.com/powershell/module/az.firmwareanalysis/get-azfirmwareanalysisfirmware @@ -875,6 +917,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -900,8 +951,6 @@ begin { List = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisFirmware_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -915,6 +964,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -1058,6 +1110,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -1080,8 +1141,6 @@ begin { List = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisPasswordHash_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1095,6 +1154,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -1140,9 +1202,9 @@ end { <# .Synopsis -Lists SBOM analysis results of a firmware. +Lists sbom analysis results of a firmware. .Description -Lists SBOM analysis results of a firmware. +Lists sbom analysis results of a firmware. .Example Get-AzFirmwareAnalysisSbomComponent -FirmwareId FirmwareId -ResourceGroupName ResourceGroupName -WorkspaceName WorkspaceName | ConvertTo-Json @@ -1238,6 +1300,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -1260,8 +1331,6 @@ begin { List = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisSbomComponent_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1275,6 +1344,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -1324,9 +1396,9 @@ Get an analysis result summary of a firmware by name. .Description Get an analysis result summary of a firmware by name. .Example -Get-AzFirmwareAnalysisSummary -FirmwareId FirmwareId -ResourceGroupName ResourceGroupName -WorkspaceName WorkspaceName -Name Type +Get-AzFirmwareAnalysisSummary -FirmwareId FirmwareId -ResourceGroupName ResourceGroupName -WorkspaceName WorkspaceName -Type CVE .Example -Get-AzFirmwareAnalysisSummary -FirmwareId FirmwareId -ResourceGroupName ResourceGroupName -WorkspaceName WorkspaceName -Name Type +Get-AzFirmwareAnalysisSummary -FirmwareId FirmwareId -ResourceGroupName ResourceGroupName -WorkspaceName WorkspaceName -Type Firmware .Inputs Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentity @@ -1340,25 +1412,28 @@ To create the parameters described below, construct a hash table containing the FIRMWAREINPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. INPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. WORKSPACEINPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. .Link https://learn.microsoft.com/powershell/module/az.firmwareanalysis/get-azfirmwareanalysissummary @@ -1374,16 +1449,6 @@ param( # The id of the firmware. ${FirmwareId}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityFirmware', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityWorkspace', Mandatory)] - [Alias('SummaryName')] - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CVE", "BinaryHardening", "CryptoCertificate", "CryptoKey")] - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] - [System.String] - # The Firmware analysis summary name describing the type of summary. - ${Name}, - [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] [System.String] @@ -1399,6 +1464,16 @@ param( # The value must be an UUID. ${SubscriptionId}, + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityFirmware', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityWorkspace', Mandatory)] + [Alias('SummaryType')] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CommonVulnerabilitiesAndExposures", "BinaryHardening", "CryptoCertificate", "CryptoKey")] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] + [System.String] + # The Firmware analysis summary name describing the type of summary. + ${Type}, + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] [System.String] @@ -1479,6 +1554,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -1504,8 +1588,6 @@ begin { GetViaIdentityWorkspace = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisSummary_GetViaIdentityWorkspace'; } if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1519,6 +1601,242 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.FirmwareAnalysis.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 +Gets monthly usage information for a workspace. +.Description +Gets monthly usage information for a workspace. +.Example +Get-AzFirmwareAnalysisUsageMetric -ResourceGroupName FirmwareAnalysisRG -WorkspaceName default + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetric +.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 + [FirmwareId ]: The id of the firmware. + [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. + [WorkspaceName ]: The name of the firmware analysis workspace. + +WORKSPACEINPUTOBJECT : Identity Parameter + [FirmwareId ]: The id of the firmware. + [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. + [WorkspaceName ]: The name of the firmware analysis workspace. +.Link +https://learn.microsoft.com/powershell/module/az.firmwareanalysis/get-azfirmwareanalysisusagemetric +#> +function Get-AzFirmwareAnalysisUsageMetric { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetric])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityWorkspace', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] + [System.String] + # The Firmware analysis summary name describing the type of summary. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] + [System.String] + # The name of the firmware analysis workspace. + ${WorkspaceName}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityWorkspace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentity] + # Identity Parameter + ${WorkspaceInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + 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.FirmwareAnalysis.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.FirmwareAnalysis.private\Get-AzFirmwareAnalysisUsageMetric_Get'; + GetViaIdentity = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisUsageMetric_GetViaIdentity'; + GetViaIdentityWorkspace = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisUsageMetric_GetViaIdentityWorkspace'; + List = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisUsageMetric_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -1584,9 +1902,10 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. .Link https://learn.microsoft.com/powershell/module/az.firmwareanalysis/get-azfirmwareanalysisworkspace @@ -1682,6 +2001,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -1707,8 +2035,6 @@ begin { List1 = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisWorkspace_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1722,6 +2048,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -1767,9 +2096,9 @@ end { <# .Synopsis -The operation to Create a firmware. +The operation to create a firmware. .Description -The operation to Create a firmware. +The operation to create a firmware. .Example New-AzFirmwareAnalysisFirmware -ResourceGroupName resourceGroupName -WorkspaceName workspaceName -Description description -FileSize 1 -FileName fileName -Vendor vendor -Model model -Version version .Example @@ -1927,6 +2256,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -1952,8 +2290,6 @@ begin { $PSBoundParameters['Id'] = New-Guid } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1967,6 +2303,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -2012,9 +2351,9 @@ end { <# .Synopsis -The operation to get a url for file upload. +Generate a URL for uploading a firmware image. .Description -The operation to get a url for file upload. +Generate a URL for uploading a firmware image. .Example New-AzFirmwareAnalysisWorkspaceUploadUrl -ResourceGroupName resourceGroupName -WorkspaceName workspaceName -FirmwareId firmwareId @@ -2029,15 +2368,16 @@ 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. -GENERATEUPLOADURL : Properties for generating an upload URL +BODY : Properties for generating an upload URL [FirmwareId ]: A unique ID for the firmware to be uploaded. INPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. .Link https://learn.microsoft.com/powershell/module/az.firmwareanalysis/new-azfirmwareanalysisworkspaceuploadurl @@ -2088,7 +2428,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest] # Properties for generating an upload URL - ${GenerateUploadUrl}, + ${Body}, [Parameter(ParameterSetName='GenerateExpanded')] [Parameter(ParameterSetName='GenerateViaIdentityExpanded')] @@ -2165,6 +2505,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -2192,8 +2541,6 @@ begin { GenerateViaJsonString = 'Az.FirmwareAnalysis.private\New-AzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaJsonString'; } if (('Generate', 'GenerateExpanded', 'GenerateViaJsonFilePath', 'GenerateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2207,6 +2554,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -2252,9 +2602,9 @@ end { <# .Synopsis -The operation to Create a firmware analysis workspace. +The operation to create a firmware analysis workspace. .Description -The operation to Create a firmware analysis workspace. +The operation to create a firmware analysis workspace. .Example New-AzFirmwareAnalysisWorkspace -ResourceGroupName resourceGroupName -Name name -Location location @@ -2295,6 +2645,42 @@ param( # The geo-location where the resource lives ${Location}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.Int32] + # If the SKU supports scale out/in then the capacity integer should be included. + # If scale out/in is not possible for the resource this may be omitted. + ${SkuCapacity}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.String] + # If the service has different generations of hardware, for the same SKU, then that can be captured here. + ${SkuFamily}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.String] + # The name of the SKU. + # E.g. + # P3. + # It is typically a letter+number code + ${SkuName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.String] + # The SKU size. + # When the name field is the combination of tier and some other value, this would be the standalone code. + ${SkuSize}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Free", "Basic", "Standard", "Premium")] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.String] + # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + ${SkuTier}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ITrackedResourceTags]))] @@ -2358,6 +2744,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -2380,8 +2775,6 @@ begin { CreateExpanded = 'Az.FirmwareAnalysis.private\New-AzFirmwareAnalysisWorkspace_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2395,6 +2788,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -2458,17 +2854,19 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. WORKSPACEINPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. .Link https://learn.microsoft.com/powershell/module/az.firmwareanalysis/remove-azfirmwareanalysisfirmware @@ -2580,6 +2978,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -2604,8 +3011,6 @@ begin { DeleteViaIdentityWorkspace = 'Az.FirmwareAnalysis.private\Remove-AzFirmwareAnalysisFirmware_DeleteViaIdentityWorkspace'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2619,6 +3024,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -2682,9 +3090,10 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. .Link https://learn.microsoft.com/powershell/module/az.firmwareanalysis/remove-azfirmwareanalysisworkspace @@ -2730,6 +3139,12 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -2750,6 +3165,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -2783,6 +3204,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -2806,8 +3236,6 @@ begin { DeleteViaIdentity = 'Az.FirmwareAnalysis.private\Remove-AzFirmwareAnalysisWorkspace_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2821,6 +3249,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -2866,9 +3297,9 @@ end { <# .Synopsis -The operation to Update firmware. +The operation to update firmware. .Description -The operation to Update firmware. +The operation to update firmware. .Example Update-AzFirmwareAnalysisFirmware -FirmwareId firmwareId -ResourceGroupName resourceGroupName -WorkspaceName workspaceName -Description description -FileSize 1 -FileName fileName -Vendor vendor -Model model -Version version @@ -2884,9 +3315,10 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. STATUSMESSAGE : A list of errors or other messages generated during firmware analysis @@ -2896,9 +3328,10 @@ STATUSMESSAGE : A list of errors or other messages generated d WORKSPACEINPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. .Link https://learn.microsoft.com/powershell/module/az.firmwareanalysis/update-azfirmwareanalysisfirmware @@ -3054,6 +3487,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -3078,8 +3520,6 @@ begin { UpdateViaIdentityWorkspaceExpanded = 'Az.FirmwareAnalysis.private\Update-AzFirmwareAnalysisFirmware_UpdateViaIdentityWorkspaceExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3093,6 +3533,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -3138,9 +3581,9 @@ end { <# .Synopsis -The operation to Update a firmware analysis workspaces. +The operation to update a firmware analysis workspaces. .Description -The operation to Update a firmware analysis workspaces. +The operation to update a firmware analysis workspaces. .Example Update-AzFirmwareAnalysisWorkspace -ResourceGroupName resourceGroupName -Name workspaceName @@ -3156,9 +3599,10 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. .Link https://learn.microsoft.com/powershell/module/az.firmwareanalysis/update-azfirmwareanalysisworkspace @@ -3195,6 +3639,48 @@ param( # Identity Parameter ${InputObject}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.Int32] + # If the SKU supports scale out/in then the capacity integer should be included. + # If scale out/in is not possible for the resource this may be omitted. + ${SkuCapacity}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.String] + # If the service has different generations of hardware, for the same SKU, then that can be captured here. + ${SkuFamily}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.String] + # The name of the SKU. + # Ex - P3. + # It is typically a letter+number code + ${SkuName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.String] + # The SKU size. + # When the name field is the combination of tier and some other value, this would be the standalone code. + ${SkuSize}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Free", "Basic", "Standard", "Premium")] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.String] + # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + ${SkuTier}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3251,6 +3737,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -3274,8 +3769,6 @@ begin { UpdateViaIdentityExpanded = 'Az.FirmwareAnalysis.private\Update-AzFirmwareAnalysisWorkspace_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3289,6 +3782,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Remove-AzFirmwareAnalysisFirmware.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Remove-AzFirmwareAnalysisFirmware.ps1 index de55dbe7b4ba..fe446d1aeed0 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Remove-AzFirmwareAnalysisFirmware.ps1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Remove-AzFirmwareAnalysisFirmware.ps1 @@ -34,17 +34,19 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. WORKSPACEINPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. .Link https://learn.microsoft.com/powershell/module/az.firmwareanalysis/remove-azfirmwareanalysisfirmware @@ -156,6 +158,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -180,8 +191,6 @@ begin { DeleteViaIdentityWorkspace = 'Az.FirmwareAnalysis.private\Remove-AzFirmwareAnalysisFirmware_DeleteViaIdentityWorkspace'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -195,6 +204,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Remove-AzFirmwareAnalysisWorkspace.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Remove-AzFirmwareAnalysisWorkspace.ps1 index 95b8db84042a..dfaaa776deff 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Remove-AzFirmwareAnalysisWorkspace.ps1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Remove-AzFirmwareAnalysisWorkspace.ps1 @@ -34,9 +34,10 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. .Link https://learn.microsoft.com/powershell/module/az.firmwareanalysis/remove-azfirmwareanalysisworkspace @@ -82,6 +83,12 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -102,6 +109,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -135,6 +148,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -158,8 +180,6 @@ begin { DeleteViaIdentity = 'Az.FirmwareAnalysis.private\Remove-AzFirmwareAnalysisWorkspace_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -173,6 +193,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Update-AzFirmwareAnalysisFirmware.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Update-AzFirmwareAnalysisFirmware.ps1 index 67a7950ae705..09cbcf9278cd 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Update-AzFirmwareAnalysisFirmware.ps1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Update-AzFirmwareAnalysisFirmware.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -The operation to Update firmware. +The operation to update firmware. .Description -The operation to Update firmware. +The operation to update firmware. .Example Update-AzFirmwareAnalysisFirmware -FirmwareId firmwareId -ResourceGroupName resourceGroupName -WorkspaceName workspaceName -Description description -FileSize 1 -FileName fileName -Vendor vendor -Model model -Version version @@ -34,9 +34,10 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. STATUSMESSAGE : A list of errors or other messages generated during firmware analysis @@ -46,9 +47,10 @@ STATUSMESSAGE : A list of errors or other messages generated d WORKSPACEINPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. .Link https://learn.microsoft.com/powershell/module/az.firmwareanalysis/update-azfirmwareanalysisfirmware @@ -204,6 +206,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -228,8 +239,6 @@ begin { UpdateViaIdentityWorkspaceExpanded = 'Az.FirmwareAnalysis.private\Update-AzFirmwareAnalysisFirmware_UpdateViaIdentityWorkspaceExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -243,6 +252,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Update-AzFirmwareAnalysisWorkspace.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Update-AzFirmwareAnalysisWorkspace.ps1 index 7f2a9a5473a8..629cc40dde43 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Update-AzFirmwareAnalysisWorkspace.ps1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/exports/Update-AzFirmwareAnalysisWorkspace.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -The operation to Update a firmware analysis workspaces. +The operation to update a firmware analysis workspaces. .Description -The operation to Update a firmware analysis workspaces. +The operation to update a firmware analysis workspaces. .Example Update-AzFirmwareAnalysisWorkspace -ResourceGroupName resourceGroupName -Name workspaceName @@ -34,9 +34,10 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [FirmwareId ]: The id of the firmware. [Id ]: Resource identity path + [Name ]: The Firmware analysis summary name describing the type of summary. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [SummaryName ]: The Firmware analysis summary name describing the type of summary. + [SummaryType ]: The Firmware analysis summary name describing the type of summary. [WorkspaceName ]: The name of the firmware analysis workspace. .Link https://learn.microsoft.com/powershell/module/az.firmwareanalysis/update-azfirmwareanalysisworkspace @@ -73,6 +74,48 @@ param( # Identity Parameter ${InputObject}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.Int32] + # If the SKU supports scale out/in then the capacity integer should be included. + # If scale out/in is not possible for the resource this may be omitted. + ${SkuCapacity}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.String] + # If the service has different generations of hardware, for the same SKU, then that can be captured here. + ${SkuFamily}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.String] + # The name of the SKU. + # Ex - P3. + # It is typically a letter+number code + ${SkuName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.String] + # The SKU size. + # When the name field is the combination of tier and some other value, this would be the standalone code. + ${SkuSize}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Free", "Basic", "Standard", "Premium")] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [System.String] + # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + ${SkuTier}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -129,6 +172,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -152,8 +204,6 @@ begin { UpdateViaIdentityExpanded = 'Az.FirmwareAnalysis.private\Update-AzFirmwareAnalysisWorkspace_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -167,6 +217,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generate-info.json b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generate-info.json index 37b0a17e1e49..d137d0550c8a 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generate-info.json +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "794ca94b-d357-43b9-81eb-a66aa20d34e3" + "generate_Id": "71b9b7a9-b147-4f99-af4f-b0e91fbdd7ff" } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/FirmwareAnalysis.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/FirmwareAnalysis.cs index 458d44798eeb..e278d89fcb06 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/FirmwareAnalysis.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/FirmwareAnalysis.cs @@ -27,9 +27,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task BinaryHardeningListByFirmware(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task BinaryHardeningListByFirmware(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -71,9 +71,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task BinaryHardeningListByFirmwareViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task BinaryHardeningListByFirmwareViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -123,12 +123,12 @@ public partial class FirmwareAnalysis /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 BinaryHardeningListByFirmwareViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task BinaryHardeningListByFirmwareViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -181,12 +181,12 @@ public partial class FirmwareAnalysis /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 BinaryHardeningListByFirmwareWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task BinaryHardeningListByFirmwareWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -225,10 +225,10 @@ public partial class FirmwareAnalysis /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 BinaryHardeningListByFirmwareWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task BinaryHardeningListByFirmwareWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -247,7 +247,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -290,7 +290,7 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task BinaryHardeningListByFirmware_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task BinaryHardeningListByFirmware_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -309,7 +309,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -354,10 +354,11 @@ public partial class FirmwareAnalysis await eventListener.AssertNotNull(nameof(workspaceName),workspaceName); await eventListener.AssertRegEx(nameof(workspaceName), workspaceName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); await eventListener.AssertNotNull(nameof(firmwareId),firmwareId); + await eventListener.AssertRegEx(nameof(firmwareId), firmwareId, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); } } - /// Lists cryptographic certificate analysis results found in a firmware. + /// Lists crypto certificate analysis results of a firmware. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -370,9 +371,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CryptoCertificatesListByFirmware(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CryptoCertificatesListByFirmware(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -404,7 +405,7 @@ public partial class FirmwareAnalysis } } - /// Lists cryptographic certificate analysis results found in a firmware. + /// Lists crypto certificate analysis results of a firmware. /// /// 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 @@ -414,9 +415,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CryptoCertificatesListByFirmwareViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CryptoCertificatesListByFirmwareViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -461,17 +462,17 @@ public partial class FirmwareAnalysis } } - /// Lists cryptographic certificate analysis results found in a firmware. + /// Lists crypto certificate analysis results of a firmware. /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 CryptoCertificatesListByFirmwareViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CryptoCertificatesListByFirmwareViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -516,7 +517,7 @@ public partial class FirmwareAnalysis } } - /// Lists cryptographic certificate analysis results found in a firmware. + /// Lists crypto certificate analysis results of a firmware. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -524,12 +525,12 @@ public partial class FirmwareAnalysis /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 CryptoCertificatesListByFirmwareWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CryptoCertificatesListByFirmwareWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -568,10 +569,10 @@ public partial class FirmwareAnalysis /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 CryptoCertificatesListByFirmwareWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CryptoCertificatesListByFirmwareWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -590,7 +591,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificateListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificateResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -633,7 +634,7 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CryptoCertificatesListByFirmware_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CryptoCertificatesListByFirmware_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -652,7 +653,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificateListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificateResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -697,10 +698,11 @@ public partial class FirmwareAnalysis await eventListener.AssertNotNull(nameof(workspaceName),workspaceName); await eventListener.AssertRegEx(nameof(workspaceName), workspaceName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); await eventListener.AssertNotNull(nameof(firmwareId),firmwareId); + await eventListener.AssertRegEx(nameof(firmwareId), firmwareId, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); } } - /// Lists cryptographic key analysis results found in a firmware. + /// Lists crypto key analysis results of a firmware. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -713,9 +715,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CryptoKeysListByFirmware(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CryptoKeysListByFirmware(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -747,7 +749,7 @@ public partial class FirmwareAnalysis } } - /// Lists cryptographic key analysis results found in a firmware. + /// Lists crypto key analysis results of a firmware. /// /// 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 @@ -757,9 +759,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CryptoKeysListByFirmwareViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CryptoKeysListByFirmwareViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -804,17 +806,17 @@ public partial class FirmwareAnalysis } } - /// Lists cryptographic key analysis results found in a firmware. + /// Lists crypto key analysis results of a firmware. /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 CryptoKeysListByFirmwareViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CryptoKeysListByFirmwareViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -859,7 +861,7 @@ public partial class FirmwareAnalysis } } - /// Lists cryptographic key analysis results found in a firmware. + /// Lists crypto key analysis results of a firmware. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -867,12 +869,12 @@ public partial class FirmwareAnalysis /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 CryptoKeysListByFirmwareWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CryptoKeysListByFirmwareWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -909,10 +911,10 @@ public partial class FirmwareAnalysis /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 CryptoKeysListByFirmwareWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CryptoKeysListByFirmwareWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -931,7 +933,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoKeyListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoKeyResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -974,7 +976,7 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CryptoKeysListByFirmware_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CryptoKeysListByFirmware_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -993,7 +995,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoKeyListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoKeyResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -1038,6 +1040,7 @@ public partial class FirmwareAnalysis await eventListener.AssertNotNull(nameof(workspaceName),workspaceName); await eventListener.AssertRegEx(nameof(workspaceName), workspaceName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); await eventListener.AssertNotNull(nameof(firmwareId),firmwareId); + await eventListener.AssertRegEx(nameof(firmwareId), firmwareId, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); } } @@ -1054,9 +1057,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CvesListByFirmware(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CvesListByFirmware(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1098,9 +1101,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CvesListByFirmwareViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CvesListByFirmwareViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1150,12 +1153,12 @@ public partial class FirmwareAnalysis /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 CvesListByFirmwareViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CvesListByFirmwareViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1208,12 +1211,12 @@ public partial class FirmwareAnalysis /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 CvesListByFirmwareWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CvesListByFirmwareWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1250,10 +1253,10 @@ public partial class FirmwareAnalysis /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 CvesListByFirmwareWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CvesListByFirmwareWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1272,7 +1275,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -1315,7 +1318,7 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CvesListByFirmware_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CvesListByFirmware_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1334,7 +1337,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -1379,10 +1382,11 @@ public partial class FirmwareAnalysis await eventListener.AssertNotNull(nameof(workspaceName),workspaceName); await eventListener.AssertRegEx(nameof(workspaceName), workspaceName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); await eventListener.AssertNotNull(nameof(firmwareId),firmwareId); + await eventListener.AssertRegEx(nameof(firmwareId), firmwareId, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); } } - /// The operation to Create a firmware. + /// The operation to create a firmware. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -1400,7 +1404,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task FirmwaresCreate(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmware 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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1435,7 +1439,7 @@ public partial class FirmwareAnalysis } } - /// The operation to Create a firmware. + /// The operation to create a firmware. /// /// Details of the firmware being created or updated. /// a delegate that is called when the remote service returns 200 (OK). @@ -1450,7 +1454,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task FirmwaresCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmware 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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1498,7 +1502,7 @@ public partial class FirmwareAnalysis } } - /// The operation to Create a firmware. + /// The operation to create a firmware. /// /// Details of the firmware being created or updated. /// an instance that will receive events. @@ -1510,7 +1514,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task FirmwaresCreateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmware body, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1558,7 +1562,7 @@ public partial class FirmwareAnalysis } } - /// The operation to Create a firmware. + /// The operation to create a firmware. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -1575,7 +1579,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task FirmwaresCreateViaJsonString(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.String jsonString, 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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1610,7 +1614,7 @@ public partial class FirmwareAnalysis } } - /// The operation to Create a firmware. + /// The operation to create a firmware. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -1624,7 +1628,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task FirmwaresCreateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1659,7 +1663,7 @@ public partial class FirmwareAnalysis } } - /// The operation to Create a firmware. + /// The operation to create a firmware. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -1674,7 +1678,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task FirmwaresCreateWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmware body, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1857,6 +1861,7 @@ public partial class FirmwareAnalysis await eventListener.AssertNotNull(nameof(workspaceName),workspaceName); await eventListener.AssertRegEx(nameof(workspaceName), workspaceName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); await eventListener.AssertNotNull(nameof(firmwareId),firmwareId); + await eventListener.AssertRegEx(nameof(firmwareId), firmwareId, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } @@ -1878,7 +1883,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task FirmwaresDelete(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1922,7 +1927,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task FirmwaresDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2047,10 +2052,11 @@ public partial class FirmwareAnalysis await eventListener.AssertNotNull(nameof(workspaceName),workspaceName); await eventListener.AssertRegEx(nameof(workspaceName), workspaceName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); await eventListener.AssertNotNull(nameof(firmwareId),firmwareId); + await eventListener.AssertRegEx(nameof(firmwareId), firmwareId, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); } } - /// The operation to a url for file download. + /// Get firmware. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -2063,9 +2069,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FirmwaresGenerateDownloadUrl(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FirmwaresGet(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2079,7 +2085,6 @@ public partial class FirmwareAnalysis + global::System.Uri.EscapeDataString(workspaceName) + "/firmwares/" + global::System.Uri.EscapeDataString(firmwareId) - + "/generateDownloadUrl" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2088,16 +2093,16 @@ public partial class FirmwareAnalysis // 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.FirmwareAnalysis.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FirmwaresGenerateDownloadUrl_Call (request, onOk,onDefault,eventListener,sender); + await this.FirmwaresGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// The operation to a url for file download. + /// Get firmware. /// /// 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 @@ -2107,9 +2112,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FirmwaresGenerateDownloadUrlViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FirmwaresGetViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2136,7 +2141,6 @@ public partial class FirmwareAnalysis + workspaceName + "/firmwares/" + firmwareId - + "/generateDownloadUrl" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2145,26 +2149,26 @@ public partial class FirmwareAnalysis // 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.FirmwareAnalysis.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FirmwaresGenerateDownloadUrl_Call (request, onOk,onDefault,eventListener,sender); + await this.FirmwaresGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// The operation to a url for file download. + /// Get firmware. /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 FirmwaresGenerateDownloadUrlViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FirmwaresGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2191,7 +2195,6 @@ public partial class FirmwareAnalysis + workspaceName + "/firmwares/" + firmwareId - + "/generateDownloadUrl" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2200,16 +2203,16 @@ public partial class FirmwareAnalysis // 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.FirmwareAnalysis.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.FirmwaresGenerateDownloadUrlWithResult_Call (request, eventListener,sender); + return await this.FirmwaresGetWithResult_Call (request, eventListener,sender); } } - /// The operation to a url for file download. + /// Get firmware. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -2217,12 +2220,12 @@ public partial class FirmwareAnalysis /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 FirmwaresGenerateDownloadUrlWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FirmwaresGetWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2236,7 +2239,6 @@ public partial class FirmwareAnalysis + global::System.Uri.EscapeDataString(workspaceName) + "/firmwares/" + global::System.Uri.EscapeDataString(firmwareId) - + "/generateDownloadUrl" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2245,26 +2247,24 @@ public partial class FirmwareAnalysis // 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.FirmwareAnalysis.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.FirmwaresGenerateDownloadUrlWithResult_Call (request, eventListener,sender); + return await this.FirmwaresGetWithResult_Call (request, eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 FirmwaresGenerateDownloadUrlWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FirmwaresGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2283,7 +2283,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UrlToken.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Firmware.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -2316,7 +2316,7 @@ public partial class FirmwareAnalysis } } - /// 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 @@ -2326,7 +2326,7 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FirmwaresGenerateDownloadUrl_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FirmwaresGet_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2345,7 +2345,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UrlToken.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Firmware.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -2367,8 +2367,8 @@ public partial class FirmwareAnalysis } /// - /// 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. /// The name of the resource group. The name is case insensitive. @@ -2378,7 +2378,7 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FirmwaresGenerateDownloadUrl_Validate(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task FirmwaresGet_Validate(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2390,14 +2390,14 @@ public partial class FirmwareAnalysis await eventListener.AssertNotNull(nameof(workspaceName),workspaceName); await eventListener.AssertRegEx(nameof(workspaceName), workspaceName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); await eventListener.AssertNotNull(nameof(firmwareId),firmwareId); + await eventListener.AssertRegEx(nameof(firmwareId), firmwareId, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); } } - /// The operation to a url for tar file download. + /// Lists all of firmwares inside a workspace. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. - /// The id of the firmware. /// 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). @@ -2406,9 +2406,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FirmwaresGenerateFilesystemDownloadUrl(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FirmwaresListByWorkspace(string subscriptionId, string resourceGroupName, string workspaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2420,9 +2420,7 @@ public partial class FirmwareAnalysis + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" + global::System.Uri.EscapeDataString(workspaceName) - + "/firmwares/" - + global::System.Uri.EscapeDataString(firmwareId) - + "/generateFilesystemDownloadUrl" + + "/firmwares" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2431,16 +2429,16 @@ public partial class FirmwareAnalysis // 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.FirmwareAnalysis.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FirmwaresGenerateFilesystemDownloadUrl_Call (request, onOk,onDefault,eventListener,sender); + await this.FirmwaresListByWorkspace_Call (request, onOk,onDefault,eventListener,sender); } } - /// The operation to a url for tar file download. + /// Lists all of firmwares inside a workspace. /// /// 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 @@ -2450,25 +2448,24 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FirmwaresGenerateFilesystemDownloadUrlViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FirmwaresListByWorkspaceViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var workspaceName = _match.Groups["workspaceName"].Value; - var firmwareId = _match.Groups["firmwareId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -2477,9 +2474,7 @@ public partial class FirmwareAnalysis + resourceGroupName + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" + workspaceName - + "/firmwares/" - + firmwareId - + "/generateFilesystemDownloadUrl" + + "/firmwares" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2488,42 +2483,41 @@ public partial class FirmwareAnalysis // 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.FirmwareAnalysis.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FirmwaresGenerateFilesystemDownloadUrl_Call (request, onOk,onDefault,eventListener,sender); + await this.FirmwaresListByWorkspace_Call (request, onOk,onDefault,eventListener,sender); } } - /// The operation to a url for tar file download. + /// Lists all of firmwares inside a workspace. /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 FirmwaresGenerateFilesystemDownloadUrlViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FirmwaresListByWorkspaceViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var workspaceName = _match.Groups["workspaceName"].Value; - var firmwareId = _match.Groups["firmwareId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -2532,9 +2526,7 @@ public partial class FirmwareAnalysis + resourceGroupName + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" + workspaceName - + "/firmwares/" - + firmwareId - + "/generateFilesystemDownloadUrl" + + "/firmwares" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2543,29 +2535,28 @@ public partial class FirmwareAnalysis // 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.FirmwareAnalysis.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.FirmwaresGenerateFilesystemDownloadUrlWithResult_Call (request, eventListener,sender); + return await this.FirmwaresListByWorkspaceWithResult_Call (request, eventListener,sender); } } - /// The operation to a url for tar file download. + /// Lists all of firmwares inside a workspace. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. - /// The id of the firmware. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 FirmwaresGenerateFilesystemDownloadUrlWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FirmwaresListByWorkspaceWithResult(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2577,9 +2568,7 @@ public partial class FirmwareAnalysis + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" + global::System.Uri.EscapeDataString(workspaceName) - + "/firmwares/" - + global::System.Uri.EscapeDataString(firmwareId) - + "/generateFilesystemDownloadUrl" + + "/firmwares" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2588,26 +2577,24 @@ public partial class FirmwareAnalysis // 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.FirmwareAnalysis.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.FirmwaresGenerateFilesystemDownloadUrlWithResult_Call (request, eventListener,sender); + return await this.FirmwaresListByWorkspaceWithResult_Call (request, eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 FirmwaresGenerateFilesystemDownloadUrlWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FirmwaresListByWorkspaceWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2626,7 +2613,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UrlToken.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -2659,9 +2646,7 @@ public partial class FirmwareAnalysis } } - /// - /// 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 @@ -2671,7 +2656,7 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FirmwaresGenerateFilesystemDownloadUrl_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FirmwaresListByWorkspace_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2690,7 +2675,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UrlToken.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -2712,18 +2697,17 @@ public partial class FirmwareAnalysis } /// - /// 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. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. - /// The id of the firmware. /// 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 FirmwaresGenerateFilesystemDownloadUrl_Validate(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task FirmwaresListByWorkspace_Validate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2734,26 +2718,27 @@ public partial class FirmwareAnalysis await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(workspaceName),workspaceName); await eventListener.AssertRegEx(nameof(workspaceName), workspaceName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); - await eventListener.AssertNotNull(nameof(firmwareId),firmwareId); } } - /// Get firmware. + /// The operation to update firmware. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. /// The id of the firmware. + /// Details of the firmware being created or updated. /// 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.FirmwareAnalysis.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FirmwaresGet(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FirmwaresUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareUpdateDefinition body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2775,28 +2760,34 @@ public partial class FirmwareAnalysis // 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.FirmwareAnalysis.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).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.FirmwareAnalysis.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FirmwaresGet_Call (request, onOk,onDefault,eventListener,sender); + await this.FirmwaresUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Get firmware. + /// The operation to update firmware. /// + /// Details of the firmware being created or updated. /// 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.FirmwareAnalysis.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FirmwaresGetViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FirmwaresUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareUpdateDefinition body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2831,26 +2822,32 @@ public partial class FirmwareAnalysis // 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.FirmwareAnalysis.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).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.FirmwareAnalysis.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FirmwaresGet_Call (request, onOk,onDefault,eventListener,sender); + await this.FirmwaresUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Get firmware. + /// The operation to update firmware. /// + /// Details of the firmware being created or updated. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FirmwaresGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FirmwaresUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareUpdateDefinition body, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2885,29 +2882,85 @@ public partial class FirmwareAnalysis // 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.FirmwareAnalysis.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).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.FirmwareAnalysis.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.FirmwaresGetWithResult_Call (request, eventListener,sender); + return await this.FirmwaresUpdateWithResult_Call (request, eventListener,sender); } } - /// Get firmware. + /// The operation to update firmware. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the firmware analysis workspace. + /// The id of the firmware. + /// Json string supplied to the FirmwaresUpdate operation + /// 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.FirmwareAnalysis.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 FirmwaresUpdateViaJsonString(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-08-02"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" + + global::System.Uri.EscapeDataString(workspaceName) + + "/firmwares/" + + global::System.Uri.EscapeDataString(firmwareId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, 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.FirmwareAnalysis.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FirmwaresUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// The operation to update firmware. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. /// The id of the firmware. + /// Json string supplied to the FirmwaresUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 FirmwaresGetWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FirmwaresUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2929,16 +2982,70 @@ public partial class FirmwareAnalysis // 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.FirmwareAnalysis.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, 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.FirmwareAnalysis.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FirmwaresUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// The operation to update firmware. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the firmware analysis workspace. + /// The id of the firmware. + /// Details of the firmware being created or updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task FirmwaresUpdateWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareUpdateDefinition body, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-08-02"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" + + global::System.Uri.EscapeDataString(workspaceName) + + "/firmwares/" + + global::System.Uri.EscapeDataString(firmwareId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // 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.FirmwareAnalysis.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).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.FirmwareAnalysis.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.FirmwaresGetWithResult_Call (request, eventListener,sender); + return await this.FirmwaresUpdateWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync pipeline to use to make the request. @@ -2946,7 +3053,7 @@ public partial class FirmwareAnalysis /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FirmwaresGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FirmwaresUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2998,7 +3105,7 @@ public partial class FirmwareAnalysis } } - /// 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 @@ -3008,7 +3115,7 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FirmwaresGet_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FirmwaresUpdate_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3049,18 +3156,19 @@ public partial class FirmwareAnalysis } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// 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. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. /// The id of the firmware. + /// Details of the firmware being created or updated. /// 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 FirmwaresGet_Validate(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task FirmwaresUpdate_Validate(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareUpdateDefinition body, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -3072,13 +3180,13 @@ public partial class FirmwareAnalysis await eventListener.AssertNotNull(nameof(workspaceName),workspaceName); await eventListener.AssertRegEx(nameof(workspaceName), workspaceName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); await eventListener.AssertNotNull(nameof(firmwareId),firmwareId); + await eventListener.AssertRegEx(nameof(firmwareId), firmwareId, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Lists all of firmwares inside a workspace. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the firmware analysis workspace. + /// List the operations for the provider /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -3087,21 +3195,15 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FirmwaresListByWorkspace(string subscriptionId, string resourceGroupName, string workspaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" - + global::System.Uri.EscapeDataString(workspaceName) - + "/firmwares" + "/providers/Microsoft.IoTFirmwareDefense/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3115,11 +3217,11 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FirmwaresListByWorkspace_Call (request, onOk,onDefault,eventListener,sender); + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists all of firmwares inside a workspace. + /// List the operations for the provider /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -3129,33 +3231,24 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FirmwaresListByWorkspaceViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.IoTFirmwareDefense/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares'"); + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.IoTFirmwareDefense/operations'"); } // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var workspaceName = _match.Groups["workspaceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" - + workspaceName - + "/firmwares" + "/providers/Microsoft.IoTFirmwareDefense/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3169,45 +3262,36 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FirmwaresListByWorkspace_Call (request, onOk,onDefault,eventListener,sender); + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists all of firmwares inside a workspace. + /// List the operations for the provider /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 FirmwaresListByWorkspaceViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.IoTFirmwareDefense/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares'"); + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.IoTFirmwareDefense/operations'"); } // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var workspaceName = _match.Groups["workspaceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" - + workspaceName - + "/firmwares" + "/providers/Microsoft.IoTFirmwareDefense/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3221,35 +3305,26 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.FirmwaresListByWorkspaceWithResult_Call (request, eventListener,sender); + return await this.OperationsListWithResult_Call (request, eventListener,sender); } } - /// Lists all of firmwares inside a workspace. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the firmware analysis workspace. + /// List the operations for the provider /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 FirmwaresListByWorkspaceWithResult(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsListWithResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" - + global::System.Uri.EscapeDataString(workspaceName) - + "/firmwares" + "/providers/Microsoft.IoTFirmwareDefense/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3263,19 +3338,19 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.FirmwaresListByWorkspaceWithResult_Call (request, eventListener,sender); + return await this.OperationsListWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 FirmwaresListByWorkspaceWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OperationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3294,7 +3369,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -3327,7 +3402,7 @@ public partial class FirmwareAnalysis } } - /// 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 @@ -3337,7 +3412,7 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FirmwaresListByWorkspace_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3356,7 +3431,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -3378,48 +3453,37 @@ public partial class FirmwareAnalysis } /// - /// 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. - /// The name of the resource group. The name is case insensitive. - /// The name of the firmware analysis workspace. /// 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 FirmwaresListByWorkspace_Validate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(workspaceName),workspaceName); - await eventListener.AssertRegEx(nameof(workspaceName), workspaceName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); + } } - /// The operation to Update firmware. + /// Lists password hash analysis results of a firmware. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. /// The id of the firmware. - /// Details of the firmware being created or updated. /// 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.FirmwareAnalysis.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FirmwaresUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareUpdateDefinition body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task PasswordHashesListByFirmware(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3433,6 +3497,7 @@ public partial class FirmwareAnalysis + global::System.Uri.EscapeDataString(workspaceName) + "/firmwares/" + global::System.Uri.EscapeDataString(firmwareId) + + "/passwordHashes" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3441,43 +3506,37 @@ public partial class FirmwareAnalysis // 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.FirmwareAnalysis.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).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.FirmwareAnalysis.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FirmwaresUpdate_Call (request, onOk,onDefault,eventListener,sender); + await this.PasswordHashesListByFirmware_Call (request, onOk,onDefault,eventListener,sender); } } - /// The operation to Update firmware. + /// Lists password hash analysis results of a firmware. /// - /// Details of the firmware being created or updated. /// 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.FirmwareAnalysis.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FirmwaresUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareUpdateDefinition body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task PasswordHashesListByFirmwareViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)/passwordHashes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/passwordHashes'"); } // replace URI parameters with values from identity @@ -3495,6 +3554,7 @@ public partial class FirmwareAnalysis + workspaceName + "/firmwares/" + firmwareId + + "/passwordHashes" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3503,41 +3563,35 @@ public partial class FirmwareAnalysis // 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.FirmwareAnalysis.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).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.FirmwareAnalysis.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FirmwaresUpdate_Call (request, onOk,onDefault,eventListener,sender); + await this.PasswordHashesListByFirmware_Call (request, onOk,onDefault,eventListener,sender); } } - /// The operation to Update firmware. + /// Lists password hash analysis results of a firmware. /// - /// Details of the firmware being created or updated. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FirmwaresUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareUpdateDefinition body, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task PasswordHashesListByFirmwareViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)/passwordHashes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/passwordHashes'"); } // replace URI parameters with values from identity @@ -3555,6 +3609,7 @@ public partial class FirmwareAnalysis + workspaceName + "/firmwares/" + firmwareId + + "/passwordHashes" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3563,135 +3618,29 @@ public partial class FirmwareAnalysis // 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.FirmwareAnalysis.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).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.FirmwareAnalysis.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.FirmwaresUpdateWithResult_Call (request, eventListener,sender); - } - } - - /// The operation to Update firmware. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the firmware analysis workspace. - /// The id of the firmware. - /// Json string supplied to the FirmwaresUpdate operation - /// 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.FirmwareAnalysis.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 FirmwaresUpdateViaJsonString(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) - { - var apiVersion = @"2024-01-10"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" - + global::System.Uri.EscapeDataString(workspaceName) - + "/firmwares/" - + global::System.Uri.EscapeDataString(firmwareId) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(jsonString, 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.FirmwareAnalysis.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.FirmwaresUpdate_Call (request, onOk,onDefault,eventListener,sender); - } - } - - /// The operation to Update firmware. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the firmware analysis workspace. - /// The id of the firmware. - /// Json string supplied to the FirmwaresUpdate operation - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 FirmwaresUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) - { - var apiVersion = @"2024-01-10"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" - + global::System.Uri.EscapeDataString(workspaceName) - + "/firmwares/" - + global::System.Uri.EscapeDataString(firmwareId) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // 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.FirmwareAnalysis.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(jsonString, 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.FirmwareAnalysis.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.FirmwaresUpdateWithResult_Call (request, eventListener,sender); + return await this.PasswordHashesListByFirmwareWithResult_Call (request, eventListener,sender); } } - /// The operation to Update firmware. + /// Lists password hash analysis results of a firmware. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. /// The id of the firmware. - /// Details of the firmware being created or updated. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FirmwaresUpdateWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareUpdateDefinition body, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task PasswordHashesListByFirmwareWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3705,6 +3654,7 @@ public partial class FirmwareAnalysis + global::System.Uri.EscapeDataString(workspaceName) + "/firmwares/" + global::System.Uri.EscapeDataString(firmwareId) + + "/passwordHashes" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3713,28 +3663,26 @@ public partial class FirmwareAnalysis // 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.FirmwareAnalysis.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).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.FirmwareAnalysis.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.FirmwaresUpdateWithResult_Call (request, eventListener,sender); + return await this.PasswordHashesListByFirmwareWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 FirmwaresUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task PasswordHashesListByFirmwareWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3753,7 +3701,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Firmware.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PasswordHashResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -3786,7 +3734,7 @@ public partial class FirmwareAnalysis } } - /// 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 @@ -3796,7 +3744,7 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FirmwaresUpdate_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task PasswordHashesListByFirmware_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3815,7 +3763,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Firmware.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PasswordHashResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -3837,19 +3785,18 @@ public partial class FirmwareAnalysis } /// - /// 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. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. /// The id of the firmware. - /// Details of the firmware being created or updated. /// 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 FirmwaresUpdate_Validate(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareUpdateDefinition body, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task PasswordHashesListByFirmware_Validate(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -3861,12 +3808,15 @@ public partial class FirmwareAnalysis await eventListener.AssertNotNull(nameof(workspaceName),workspaceName); await eventListener.AssertRegEx(nameof(workspaceName), workspaceName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); await eventListener.AssertNotNull(nameof(firmwareId),firmwareId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertRegEx(nameof(firmwareId), firmwareId, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); } } - /// Lists the operations for this resource provider + /// Lists sbom analysis results of a firmware. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the firmware analysis workspace. + /// The id of the firmware. /// 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). @@ -3875,15 +3825,23 @@ public partial class FirmwareAnalysis /// /// 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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SbomComponentsListByFirmware(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.IoTFirmwareDefense/operations" + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" + + global::System.Uri.EscapeDataString(workspaceName) + + "/firmwares/" + + global::System.Uri.EscapeDataString(firmwareId) + + "/sbomComponents" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3897,11 +3855,11 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); + await this.SbomComponentsListByFirmware_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists the operations for this resource provider + /// Lists sbom analysis results of a firmware. /// /// 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 @@ -3911,24 +3869,36 @@ public partial class FirmwareAnalysis /// /// 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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SbomComponentsListByFirmwareViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.IoTFirmwareDefense/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)/sbomComponents$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.IoTFirmwareDefense/operations'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/sbomComponents'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var workspaceName = _match.Groups["workspaceName"].Value; + var firmwareId = _match.Groups["firmwareId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.IoTFirmwareDefense/operations" + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" + + workspaceName + + "/firmwares/" + + firmwareId + + "/sbomComponents" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3942,36 +3912,48 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); + await this.SbomComponentsListByFirmware_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists the operations for this resource provider + /// Lists sbom analysis results of a firmware. /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 OperationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SbomComponentsListByFirmwareViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.IoTFirmwareDefense/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)/sbomComponents$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.IoTFirmwareDefense/operations'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/sbomComponents'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var workspaceName = _match.Groups["workspaceName"].Value; + var firmwareId = _match.Groups["firmwareId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.IoTFirmwareDefense/operations" + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" + + workspaceName + + "/firmwares/" + + firmwareId + + "/sbomComponents" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3985,26 +3967,38 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.OperationsListWithResult_Call (request, eventListener,sender); + return await this.SbomComponentsListByFirmwareWithResult_Call (request, eventListener,sender); } } - /// Lists the operations for this resource provider + /// Lists sbom analysis results of a firmware. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the firmware analysis workspace. + /// The id of the firmware. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 OperationsListWithResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SbomComponentsListByFirmwareWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.IoTFirmwareDefense/operations" + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" + + global::System.Uri.EscapeDataString(workspaceName) + + "/firmwares/" + + global::System.Uri.EscapeDataString(firmwareId) + + "/sbomComponents" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4018,19 +4012,21 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.OperationsListWithResult_Call (request, eventListener,sender); + return await this.SbomComponentsListByFirmwareWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 OperationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SbomComponentsListByFirmwareWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4049,7 +4045,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SbomComponentResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -4082,7 +4078,7 @@ public partial class FirmwareAnalysis } } - /// 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 @@ -4092,7 +4088,7 @@ public partial class FirmwareAnalysis /// /// 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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SbomComponentsListByFirmware_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4111,7 +4107,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SbomComponentResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -4133,26 +4129,39 @@ public partial class FirmwareAnalysis } /// - /// 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. + /// The name of the resource group. The name is case insensitive. + /// The name of the firmware analysis workspace. + /// The id of the firmware. /// 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.FirmwareAnalysis.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SbomComponentsListByFirmware_Validate(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(workspaceName),workspaceName); + await eventListener.AssertRegEx(nameof(workspaceName), workspaceName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); + await eventListener.AssertNotNull(nameof(firmwareId),firmwareId); + await eventListener.AssertRegEx(nameof(firmwareId), firmwareId, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); } } - /// Lists password hash analysis results of a firmware. + /// Get an analysis result summary of a firmware by name. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. /// The id of the firmware. + /// The Firmware analysis summary name describing the type of summary. /// 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). @@ -4161,9 +4170,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PasswordHashesListByFirmware(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SummariesGet(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, string summaryType, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4177,7 +4186,8 @@ public partial class FirmwareAnalysis + global::System.Uri.EscapeDataString(workspaceName) + "/firmwares/" + global::System.Uri.EscapeDataString(firmwareId) - + "/passwordHashes" + + "/summaries/" + + global::System.Uri.EscapeDataString(summaryType) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4191,11 +4201,11 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PasswordHashesListByFirmware_Call (request, onOk,onDefault,eventListener,sender); + await this.SummariesGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists password hash analysis results of a firmware. + /// Get an analysis result summary of a firmware by 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 @@ -4205,18 +4215,18 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PasswordHashesListByFirmwareViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SummariesGetViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)/passwordHashes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)/summaries/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/passwordHashes'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryType}'"); } // replace URI parameters with values from identity @@ -4224,6 +4234,7 @@ public partial class FirmwareAnalysis var resourceGroupName = _match.Groups["resourceGroupName"].Value; var workspaceName = _match.Groups["workspaceName"].Value; var firmwareId = _match.Groups["firmwareId"].Value; + var summaryType = _match.Groups["summaryType"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4234,7 +4245,8 @@ public partial class FirmwareAnalysis + workspaceName + "/firmwares/" + firmwareId - + "/passwordHashes" + + "/summaries/" + + summaryType + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4248,30 +4260,30 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PasswordHashesListByFirmware_Call (request, onOk,onDefault,eventListener,sender); + await this.SummariesGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists password hash analysis results of a firmware. + /// Get an analysis result summary of a firmware by name. /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 PasswordHashesListByFirmwareViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SummariesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)/passwordHashes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)/summaries/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/passwordHashes'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryType}'"); } // replace URI parameters with values from identity @@ -4279,6 +4291,7 @@ public partial class FirmwareAnalysis var resourceGroupName = _match.Groups["resourceGroupName"].Value; var workspaceName = _match.Groups["workspaceName"].Value; var firmwareId = _match.Groups["firmwareId"].Value; + var summaryType = _match.Groups["summaryType"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4289,7 +4302,8 @@ public partial class FirmwareAnalysis + workspaceName + "/firmwares/" + firmwareId - + "/passwordHashes" + + "/summaries/" + + summaryType + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4303,24 +4317,25 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.PasswordHashesListByFirmwareWithResult_Call (request, eventListener,sender); + return await this.SummariesGetWithResult_Call (request, eventListener,sender); } } - /// Lists password hash analysis results of a firmware. + /// Get an analysis result summary of a firmware by name. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. /// The id of the firmware. + /// The Firmware analysis summary name describing the type of summary. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 PasswordHashesListByFirmwareWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SummariesGetWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, string summaryType, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4334,7 +4349,8 @@ public partial class FirmwareAnalysis + global::System.Uri.EscapeDataString(workspaceName) + "/firmwares/" + global::System.Uri.EscapeDataString(firmwareId) - + "/passwordHashes" + + "/summaries/" + + global::System.Uri.EscapeDataString(summaryType) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4348,21 +4364,19 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.PasswordHashesListByFirmwareWithResult_Call (request, eventListener,sender); + return await this.SummariesGetWithResult_Call (request, eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 PasswordHashesListByFirmwareWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SummariesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4381,7 +4395,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PasswordHashListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -4414,7 +4428,7 @@ public partial class FirmwareAnalysis } } - /// 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 @@ -4424,7 +4438,7 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PasswordHashesListByFirmware_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SummariesGet_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4443,7 +4457,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PasswordHashListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -4465,18 +4479,19 @@ public partial class FirmwareAnalysis } /// - /// 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. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. /// The id of the firmware. + /// The Firmware analysis summary name describing the type of summary. /// 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 PasswordHashesListByFirmware_Validate(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SummariesGet_Validate(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, string summaryType, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -4488,10 +4503,14 @@ public partial class FirmwareAnalysis await eventListener.AssertNotNull(nameof(workspaceName),workspaceName); await eventListener.AssertRegEx(nameof(workspaceName), workspaceName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); await eventListener.AssertNotNull(nameof(firmwareId),firmwareId); + await eventListener.AssertRegEx(nameof(firmwareId), firmwareId, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); + await eventListener.AssertNotNull(nameof(summaryType),summaryType); } } - /// Lists SBOM analysis results of a firmware. + /// + /// Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name. + /// /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -4504,9 +4523,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SbomComponentsListByFirmware(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SummariesListByFirmware(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4520,7 +4539,7 @@ public partial class FirmwareAnalysis + global::System.Uri.EscapeDataString(workspaceName) + "/firmwares/" + global::System.Uri.EscapeDataString(firmwareId) - + "/sbomComponents" + + "/summaries" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4534,11 +4553,13 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SbomComponentsListByFirmware_Call (request, onOk,onDefault,eventListener,sender); + await this.SummariesListByFirmware_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists SBOM analysis results of a firmware. + /// + /// Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by 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 @@ -4548,18 +4569,18 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SbomComponentsListByFirmwareViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SummariesListByFirmwareViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)/sbomComponents$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)/summaries$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/sbomComponents'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries'"); } // replace URI parameters with values from identity @@ -4577,7 +4598,7 @@ public partial class FirmwareAnalysis + workspaceName + "/firmwares/" + firmwareId - + "/sbomComponents" + + "/summaries" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4591,30 +4612,32 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SbomComponentsListByFirmware_Call (request, onOk,onDefault,eventListener,sender); + await this.SummariesListByFirmware_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists SBOM analysis results of a firmware. + /// + /// Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name. + /// /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 SbomComponentsListByFirmwareViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SummariesListByFirmwareViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)/sbomComponents$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)/summaries$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/sbomComponents'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries'"); } // replace URI parameters with values from identity @@ -4632,7 +4655,7 @@ public partial class FirmwareAnalysis + workspaceName + "/firmwares/" + firmwareId - + "/sbomComponents" + + "/summaries" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4646,11 +4669,13 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.SbomComponentsListByFirmwareWithResult_Call (request, eventListener,sender); + return await this.SummariesListByFirmwareWithResult_Call (request, eventListener,sender); } } - /// Lists SBOM analysis results of a firmware. + /// + /// Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name. + /// /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -4658,12 +4683,12 @@ public partial class FirmwareAnalysis /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 SbomComponentsListByFirmwareWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SummariesListByFirmwareWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4677,7 +4702,7 @@ public partial class FirmwareAnalysis + global::System.Uri.EscapeDataString(workspaceName) + "/firmwares/" + global::System.Uri.EscapeDataString(firmwareId) - + "/sbomComponents" + + "/summaries" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4691,21 +4716,19 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.SbomComponentsListByFirmwareWithResult_Call (request, eventListener,sender); + return await this.SummariesListByFirmwareWithResult_Call (request, eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 SbomComponentsListByFirmwareWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SummariesListByFirmwareWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4724,7 +4747,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SbomComponentListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -4757,7 +4780,7 @@ public partial class FirmwareAnalysis } } - /// 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 @@ -4767,7 +4790,7 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SbomComponentsListByFirmware_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SummariesListByFirmware_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4786,7 +4809,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SbomComponentListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -4808,8 +4831,8 @@ public partial class FirmwareAnalysis } /// - /// 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. /// The name of the resource group. The name is case insensitive. @@ -4819,7 +4842,7 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SbomComponentsListByFirmware_Validate(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SummariesListByFirmware_Validate(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -4831,15 +4854,15 @@ public partial class FirmwareAnalysis await eventListener.AssertNotNull(nameof(workspaceName),workspaceName); await eventListener.AssertRegEx(nameof(workspaceName), workspaceName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); await eventListener.AssertNotNull(nameof(firmwareId),firmwareId); + await eventListener.AssertRegEx(nameof(firmwareId), firmwareId, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); } } - /// Get an analysis result summary of a firmware by name. + /// Gets monthly usage information for a workspace. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. - /// The id of the firmware. - /// The Firmware analysis summary name describing the type of summary. + /// The Firmware analysis summary name describing the type of summary. /// 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). @@ -4848,9 +4871,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SummariesGet(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, string summaryName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UsageMetricsGet(string subscriptionId, string resourceGroupName, string workspaceName, string name, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4862,10 +4885,8 @@ public partial class FirmwareAnalysis + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" + global::System.Uri.EscapeDataString(workspaceName) - + "/firmwares/" - + global::System.Uri.EscapeDataString(firmwareId) - + "/summaries/" - + global::System.Uri.EscapeDataString(summaryName) + + "/usageMetrics/" + + global::System.Uri.EscapeDataString(name) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4879,11 +4900,11 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SummariesGet_Call (request, onOk,onDefault,eventListener,sender); + await this.UsageMetricsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Get an analysis result summary of a firmware by name. + /// Gets monthly usage information for a workspace. /// /// 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 @@ -4893,26 +4914,25 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SummariesGetViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UsageMetricsGetViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)/summaries/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/usageMetrics/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/usageMetrics/{name}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var workspaceName = _match.Groups["workspaceName"].Value; - var firmwareId = _match.Groups["firmwareId"].Value; - var summaryName = _match.Groups["summaryName"].Value; + var name = _match.Groups["name"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4921,10 +4941,8 @@ public partial class FirmwareAnalysis + resourceGroupName + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" + workspaceName - + "/firmwares/" - + firmwareId - + "/summaries/" - + summaryName + + "/usageMetrics/" + + name + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4938,38 +4956,37 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SummariesGet_Call (request, onOk,onDefault,eventListener,sender); + await this.UsageMetricsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Get an analysis result summary of a firmware by name. + /// Gets monthly usage information for a workspace. /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 SummariesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UsageMetricsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)/summaries/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/usageMetrics/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/usageMetrics/{name}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var workspaceName = _match.Groups["workspaceName"].Value; - var firmwareId = _match.Groups["firmwareId"].Value; - var summaryName = _match.Groups["summaryName"].Value; + var name = _match.Groups["name"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4978,10 +4995,8 @@ public partial class FirmwareAnalysis + resourceGroupName + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" + workspaceName - + "/firmwares/" - + firmwareId - + "/summaries/" - + summaryName + + "/usageMetrics/" + + name + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4995,25 +5010,24 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.SummariesGetWithResult_Call (request, eventListener,sender); + return await this.UsageMetricsGetWithResult_Call (request, eventListener,sender); } } - /// Get an analysis result summary of a firmware by name. + /// Gets monthly usage information for a workspace. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. - /// The id of the firmware. - /// The Firmware analysis summary name describing the type of summary. + /// The Firmware analysis summary name describing the type of summary. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 SummariesGetWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, string summaryName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UsageMetricsGetWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string name, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5025,10 +5039,8 @@ public partial class FirmwareAnalysis + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" + global::System.Uri.EscapeDataString(workspaceName) - + "/firmwares/" - + global::System.Uri.EscapeDataString(firmwareId) - + "/summaries/" - + global::System.Uri.EscapeDataString(summaryName) + + "/usageMetrics/" + + global::System.Uri.EscapeDataString(name) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5042,19 +5054,19 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.SummariesGetWithResult_Call (request, eventListener,sender); + return await this.UsageMetricsGetWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 SummariesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task UsageMetricsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5073,7 +5085,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UsageMetric.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -5106,7 +5118,7 @@ public partial class FirmwareAnalysis } } - /// 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 @@ -5116,7 +5128,7 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SummariesGet_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task UsageMetricsGet_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5135,7 +5147,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UsageMetric.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -5157,19 +5169,18 @@ public partial class FirmwareAnalysis } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// 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. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. - /// The id of the firmware. - /// The Firmware analysis summary name describing the type of summary. + /// The Firmware analysis summary name describing the type of summary. /// 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 SummariesGet_Validate(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, string summaryName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task UsageMetricsGet_Validate(string subscriptionId, string resourceGroupName, string workspaceName, string name, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -5180,18 +5191,15 @@ public partial class FirmwareAnalysis await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(workspaceName),workspaceName); await eventListener.AssertRegEx(nameof(workspaceName), workspaceName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); - await eventListener.AssertNotNull(nameof(firmwareId),firmwareId); - await eventListener.AssertNotNull(nameof(summaryName),summaryName); + await eventListener.AssertNotNull(nameof(name),name); + await eventListener.AssertRegEx(nameof(name), name, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); } } - /// - /// Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name. - /// + /// Lists monthly usage information for a workspace. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. - /// The id of the firmware. /// 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). @@ -5200,9 +5208,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SummariesListByFirmware(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UsageMetricsListByWorkspace(string subscriptionId, string resourceGroupName, string workspaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5214,9 +5222,7 @@ public partial class FirmwareAnalysis + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" + global::System.Uri.EscapeDataString(workspaceName) - + "/firmwares/" - + global::System.Uri.EscapeDataString(firmwareId) - + "/summaries" + + "/usageMetrics" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5230,13 +5236,11 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SummariesListByFirmware_Call (request, onOk,onDefault,eventListener,sender); + await this.UsageMetricsListByWorkspace_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name. - /// + /// Lists monthly usage information for a workspace. /// /// 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 @@ -5246,25 +5250,24 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SummariesListByFirmwareViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UsageMetricsListByWorkspaceViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)/summaries$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/usageMetrics$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/usageMetrics'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var workspaceName = _match.Groups["workspaceName"].Value; - var firmwareId = _match.Groups["firmwareId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -5273,9 +5276,7 @@ public partial class FirmwareAnalysis + resourceGroupName + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" + workspaceName - + "/firmwares/" - + firmwareId - + "/summaries" + + "/usageMetrics" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5289,39 +5290,36 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SummariesListByFirmware_Call (request, onOk,onDefault,eventListener,sender); + await this.UsageMetricsListByWorkspace_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name. - /// + /// Lists monthly usage information for a workspace. /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 SummariesListByFirmwareViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UsageMetricsListByWorkspaceViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/firmwares/(?[^/]+)/summaries$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.IoTFirmwareDefense/workspaces/(?[^/]+)/usageMetrics$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/usageMetrics'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var workspaceName = _match.Groups["workspaceName"].Value; - var firmwareId = _match.Groups["firmwareId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -5330,9 +5328,7 @@ public partial class FirmwareAnalysis + resourceGroupName + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" + workspaceName - + "/firmwares/" - + firmwareId - + "/summaries" + + "/usageMetrics" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5346,26 +5342,23 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.SummariesListByFirmwareWithResult_Call (request, eventListener,sender); + return await this.UsageMetricsListByWorkspaceWithResult_Call (request, eventListener,sender); } } - /// - /// Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name. - /// + /// Lists monthly usage information for a workspace. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. - /// The id of the firmware. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 SummariesListByFirmwareWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UsageMetricsListByWorkspaceWithResult(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5377,9 +5370,7 @@ public partial class FirmwareAnalysis + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.IoTFirmwareDefense/workspaces/" + global::System.Uri.EscapeDataString(workspaceName) - + "/firmwares/" - + global::System.Uri.EscapeDataString(firmwareId) - + "/summaries" + + "/usageMetrics" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5393,19 +5384,21 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.SummariesListByFirmwareWithResult_Call (request, eventListener,sender); + return await this.UsageMetricsListByWorkspaceWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 SummariesListByFirmwareWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task UsageMetricsListByWorkspaceWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5424,7 +5417,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UsageMetricListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -5457,7 +5450,7 @@ public partial class FirmwareAnalysis } } - /// 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 @@ -5467,7 +5460,7 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SummariesListByFirmware_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task UsageMetricsListByWorkspace_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5486,7 +5479,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UsageMetricListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -5508,18 +5501,17 @@ public partial class FirmwareAnalysis } /// - /// 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. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. - /// The id of the firmware. /// 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 SummariesListByFirmware_Validate(string subscriptionId, string resourceGroupName, string workspaceName, string firmwareId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task UsageMetricsListByWorkspace_Validate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -5530,11 +5522,10 @@ public partial class FirmwareAnalysis await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(workspaceName),workspaceName); await eventListener.AssertRegEx(nameof(workspaceName), workspaceName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"); - await eventListener.AssertNotNull(nameof(firmwareId),firmwareId); } } - /// The operation to Create a firmware analysis workspace. + /// The operation to create a firmware analysis workspace. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -5551,7 +5542,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task WorkspacesCreate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspace 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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5584,7 +5575,7 @@ public partial class FirmwareAnalysis } } - /// The operation to Create a firmware analysis workspace. + /// The operation to create a firmware analysis workspace. /// /// Parameters when creating a firmware analysis workspace. /// a delegate that is called when the remote service returns 200 (OK). @@ -5599,7 +5590,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task WorkspacesCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspace 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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5644,7 +5635,7 @@ public partial class FirmwareAnalysis } } - /// The operation to Create a firmware analysis workspace. + /// The operation to create a firmware analysis workspace. /// /// Parameters when creating a firmware analysis workspace. /// an instance that will receive events. @@ -5656,7 +5647,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task WorkspacesCreateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspace body, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5701,7 +5692,7 @@ public partial class FirmwareAnalysis } } - /// The operation to Create a firmware analysis workspace. + /// The operation to create a firmware analysis workspace. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -5717,7 +5708,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task WorkspacesCreateViaJsonString(string subscriptionId, string resourceGroupName, string workspaceName, global::System.String jsonString, 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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5750,7 +5741,7 @@ public partial class FirmwareAnalysis } } - /// The operation to Create a firmware analysis workspace. + /// The operation to create a firmware analysis workspace. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -5763,7 +5754,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task WorkspacesCreateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string workspaceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5796,7 +5787,7 @@ public partial class FirmwareAnalysis } } - /// The operation to Create a firmware analysis workspace. + /// The operation to create a firmware analysis workspace. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -5810,7 +5801,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task WorkspacesCreateWithResult(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspace body, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5998,8 +5989,8 @@ public partial class FirmwareAnalysis /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. - /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 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. @@ -6007,9 +5998,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task WorkspacesDelete(string subscriptionId, string resourceGroupName, string workspaceName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task WorkspacesDelete(string subscriptionId, string resourceGroupName, string workspaceName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6034,14 +6025,14 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.WorkspacesDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + await this.WorkspacesDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); } } /// The operation to delete a firmware analysis workspace. /// - /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 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. @@ -6049,9 +6040,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task WorkspacesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task WorkspacesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6088,14 +6079,14 @@ public partial class FirmwareAnalysis await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.WorkspacesDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + await this.WorkspacesDelete_Call (request, onNoContent,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 204 (NoContent). + /// 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. @@ -6103,17 +6094,110 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task WorkspacesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task WorkspacesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-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 ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // 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"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.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(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -6174,7 +6258,7 @@ public partial class FirmwareAnalysis } } - /// The operation to get a url for file upload. + /// Generate a URL for uploading a firmware image. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -6190,7 +6274,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task WorkspacesGenerateUploadUrl(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6224,7 +6308,7 @@ public partial class FirmwareAnalysis } } - /// The operation to get a url for file upload. + /// Generate a URL for uploading a firmware image. /// /// Parameters when requesting a URL to upload firmware. /// a delegate that is called when the remote service returns 200 (OK). @@ -6238,7 +6322,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task WorkspacesGenerateUploadUrlViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6284,7 +6368,7 @@ public partial class FirmwareAnalysis } } - /// The operation to get a url for file upload. + /// Generate a URL for uploading a firmware image. /// /// Parameters when requesting a URL to upload firmware. /// an instance that will receive events. @@ -6296,7 +6380,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task WorkspacesGenerateUploadUrlViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest body, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6342,7 +6426,7 @@ public partial class FirmwareAnalysis } } - /// The operation to get a url for file upload. + /// Generate a URL for uploading a firmware image. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -6357,7 +6441,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task WorkspacesGenerateUploadUrlViaJsonString(string subscriptionId, string resourceGroupName, string workspaceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6391,7 +6475,7 @@ public partial class FirmwareAnalysis } } - /// The operation to get a url for file upload. + /// Generate a URL for uploading a firmware image. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -6404,7 +6488,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task WorkspacesGenerateUploadUrlViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string workspaceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6438,7 +6522,7 @@ public partial class FirmwareAnalysis } } - /// The operation to get a url for file upload. + /// Generate a URL for uploading a firmware image. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -6452,7 +6536,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task WorkspacesGenerateUploadUrlWithResult(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest body, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6640,7 +6724,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task WorkspacesGet(string subscriptionId, string resourceGroupName, string workspaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6681,7 +6765,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task WorkspacesGetViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6732,7 +6816,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task WorkspacesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6785,7 +6869,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task WorkspacesGetWithResult(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6960,9 +7044,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task WorkspacesListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task WorkspacesListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7000,9 +7084,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task WorkspacesListByResourceGroupViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task WorkspacesListByResourceGroupViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7046,12 +7130,12 @@ public partial class FirmwareAnalysis /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 WorkspacesListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task WorkspacesListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7096,12 +7180,12 @@ public partial class FirmwareAnalysis /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 WorkspacesListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task WorkspacesListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7136,10 +7220,10 @@ public partial class FirmwareAnalysis /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 WorkspacesListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task WorkspacesListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7158,7 +7242,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -7201,7 +7285,7 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task WorkspacesListByResourceGroup_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task WorkspacesListByResourceGroup_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7220,7 +7304,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -7273,9 +7357,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task WorkspacesListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task WorkspacesListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7311,9 +7395,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task WorkspacesListBySubscriptionViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task WorkspacesListBySubscriptionViaIdentity(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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7354,12 +7438,12 @@ public partial class FirmwareAnalysis /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 WorkspacesListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task WorkspacesListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7400,12 +7484,12 @@ public partial class FirmwareAnalysis /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 WorkspacesListBySubscriptionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task WorkspacesListBySubscriptionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7438,10 +7522,10 @@ public partial class FirmwareAnalysis /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 WorkspacesListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task WorkspacesListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7460,7 +7544,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -7503,7 +7587,7 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task WorkspacesListBySubscription_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task WorkspacesListBySubscription_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.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7522,7 +7606,7 @@ public partial class FirmwareAnalysis case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -7561,7 +7645,7 @@ public partial class FirmwareAnalysis } } - /// The operation to Update a firmware analysis workspaces. + /// The operation to update a firmware analysis workspaces. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -7575,9 +7659,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task WorkspacesUpdate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinition body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task WorkspacesUpdate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7610,7 +7694,7 @@ public partial class FirmwareAnalysis } } - /// The operation to Update a firmware analysis workspaces. + /// The operation to update a firmware analysis workspaces. /// /// Parameters when updating a firmware analysis workspace. /// a delegate that is called when the remote service returns 200 (OK). @@ -7622,9 +7706,9 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task WorkspacesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinition body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task WorkspacesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7669,7 +7753,7 @@ public partial class FirmwareAnalysis } } - /// The operation to Update a firmware analysis workspaces. + /// The operation to update a firmware analysis workspaces. /// /// Parameters when updating a firmware analysis workspace. /// an instance that will receive events. @@ -7679,9 +7763,9 @@ public partial class FirmwareAnalysis /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task WorkspacesUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinition body, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task WorkspacesUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdate body, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7726,7 +7810,7 @@ public partial class FirmwareAnalysis } } - /// The operation to Update a firmware analysis workspaces. + /// The operation to update a firmware analysis workspaces. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -7741,7 +7825,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task WorkspacesUpdateViaJsonString(string subscriptionId, string resourceGroupName, string workspaceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7774,7 +7858,7 @@ public partial class FirmwareAnalysis } } - /// The operation to Update a firmware analysis workspaces. + /// The operation to update a firmware analysis workspaces. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -7787,7 +7871,7 @@ public partial class FirmwareAnalysis /// public async global::System.Threading.Tasks.Task WorkspacesUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string workspaceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7820,7 +7904,7 @@ public partial class FirmwareAnalysis } } - /// The operation to Update a firmware analysis workspaces. + /// The operation to update a firmware analysis workspaces. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the firmware analysis workspace. @@ -7832,9 +7916,9 @@ public partial class FirmwareAnalysis /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task WorkspacesUpdateWithResult(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinition body, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task WorkspacesUpdateWithResult(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdate body, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-01-10"; + var apiVersion = @"2025-08-02"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7989,7 +8073,7 @@ public partial class FirmwareAnalysis /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task WorkspacesUpdate_Validate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinition body, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task WorkspacesUpdate_Validate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdate body, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/AzureResourceManagerCommonTypesSkuUpdate.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/AzureResourceManagerCommonTypesSkuUpdate.PowerShell.cs new file mode 100644 index 000000000000..2c9dafece17b --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/AzureResourceManagerCommonTypesSkuUpdate.PowerShell.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + + /// The resource model definition representing SKU + [System.ComponentModel.TypeConverter(typeof(AzureResourceManagerCommonTypesSkuUpdateTypeConverter))] + public partial class AzureResourceManagerCommonTypesSkuUpdate + { + + /// + /// 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 AzureResourceManagerCommonTypesSkuUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Tier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Tier = (string) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Tier, global::System.Convert.ToString); + } + if (content.Contains("Size")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Size = (string) content.GetValueForProperty("Size",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Size, global::System.Convert.ToString); + } + if (content.Contains("Family")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Family = (string) content.GetValueForProperty("Family",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Family, global::System.Convert.ToString); + } + if (content.Contains("Capacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureResourceManagerCommonTypesSkuUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Tier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Tier = (string) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Tier, global::System.Convert.ToString); + } + if (content.Contains("Size")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Size = (string) content.GetValueForProperty("Size",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Size, global::System.Convert.ToString); + } + if (content.Contains("Family")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Family = (string) content.GetValueForProperty("Family",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Family, global::System.Convert.ToString); + } + if (content.Contains("Capacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + 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.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureResourceManagerCommonTypesSkuUpdate(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.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureResourceManagerCommonTypesSkuUpdate(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.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The resource model definition representing SKU + [System.ComponentModel.TypeConverter(typeof(AzureResourceManagerCommonTypesSkuUpdateTypeConverter))] + public partial interface IAzureResourceManagerCommonTypesSkuUpdate + + { + + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/AzureResourceManagerCommonTypesSkuUpdate.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/AzureResourceManagerCommonTypesSkuUpdate.TypeConverter.cs new file mode 100644 index 000000000000..a2e74252e6f5 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/AzureResourceManagerCommonTypesSkuUpdate.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.FirmwareAnalysis.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AzureResourceManagerCommonTypesSkuUpdateTypeConverter : 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.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AzureResourceManagerCommonTypesSkuUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AzureResourceManagerCommonTypesSkuUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AzureResourceManagerCommonTypesSkuUpdate.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/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/AzureResourceManagerCommonTypesSkuUpdate.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/AzureResourceManagerCommonTypesSkuUpdate.cs new file mode 100644 index 000000000000..084fcfcbfe0e --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/AzureResourceManagerCommonTypesSkuUpdate.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + + /// The resource model definition representing SKU + public partial class AzureResourceManagerCommonTypesSkuUpdate : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdate, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal + { + + /// Backing field for property. + private int? _capacity; + + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public int? Capacity { get => this._capacity; set => this._capacity = value; } + + /// Backing field for property. + private string _family; + + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string Family { get => this._family; set => this._family = value; } + + /// Backing field for property. + private string _name; + + /// The name of the SKU. Ex - P3. It is typically a letter+number code + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _size; + + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string Size { get => this._size; set => this._size = value; } + + /// Backing field for property. + private string _tier; + + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string Tier { get => this._tier; set => this._tier = value; } + + /// + /// Creates an new instance. + /// + public AzureResourceManagerCommonTypesSkuUpdate() + { + + } + } + /// The resource model definition representing SKU + public partial interface IAzureResourceManagerCommonTypesSkuUpdate : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable + { + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", + SerializedName = @"capacity", + PossibleTypes = new [] { typeof(int) })] + int? Capacity { get; set; } + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", + SerializedName = @"family", + PossibleTypes = new [] { typeof(string) })] + string Family { get; set; } + /// The name of the SKU. Ex - P3. It is typically a letter+number code + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the SKU. Ex - P3. It is typically a letter+number code", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.", + SerializedName = @"size", + PossibleTypes = new [] { typeof(string) })] + string Size { get; set; } + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", + SerializedName = @"tier", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Free", "Basic", "Standard", "Premium")] + string Tier { get; set; } + + } + /// The resource model definition representing SKU + internal partial interface IAzureResourceManagerCommonTypesSkuUpdateInternal + + { + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + int? Capacity { get; set; } + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + string Family { get; set; } + /// The name of the SKU. Ex - P3. It is typically a letter+number code + string Name { get; set; } + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + string Size { get; set; } + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Free", "Basic", "Standard", "Premium")] + string Tier { get; set; } + + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/AzureResourceManagerCommonTypesSkuUpdate.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/AzureResourceManagerCommonTypesSkuUpdate.json.cs new file mode 100644 index 000000000000..73b4a7ea8af0 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/AzureResourceManagerCommonTypesSkuUpdate.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + + /// The resource model definition representing SKU + public partial class AzureResourceManagerCommonTypesSkuUpdate + { + + /// + /// 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.FirmwareAnalysis.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.FirmwareAnalysis.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.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject instance to deserialize from. + internal AzureResourceManagerCommonTypesSkuUpdate(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_tier = If( json?.PropertyT("tier"), out var __jsonTier) ? (string)__jsonTier : (string)_tier;} + {_size = If( json?.PropertyT("size"), out var __jsonSize) ? (string)__jsonSize : (string)_size;} + {_family = If( json?.PropertyT("family"), out var __jsonFamily) ? (string)__jsonFamily : (string)_family;} + {_capacity = If( json?.PropertyT("capacity"), out var __jsonCapacity) ? (int?)__jsonCapacity : _capacity;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new AzureResourceManagerCommonTypesSkuUpdate(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.FirmwareAnalysis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._tier)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._tier.ToString()) : null, "tier" ,container.Add ); + AddIf( null != (((object)this._size)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._size.ToString()) : null, "size" ,container.Add ); + AddIf( null != (((object)this._family)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._family.ToString()) : null, "family" ,container.Add ); + AddIf( null != this._capacity ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((int)this._capacity) : null, "capacity" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningFeatures.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningFeatures.PowerShell.cs index c71460e1fe92..a08e455fdff4 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningFeatures.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningFeatures.PowerShell.cs @@ -76,17 +76,17 @@ internal BinaryHardeningFeatures(global::System.Collections.IDictionary content) return; } // actually deserialize - if (content.Contains("Nx")) + if (content.Contains("NoExecute")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).Nx = (bool?) content.GetValueForProperty("Nx",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).Nx, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).NoExecute = (bool?) content.GetValueForProperty("NoExecute",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).NoExecute, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("Pie")) + if (content.Contains("PositionIndependentExecutable")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).Pie = (bool?) content.GetValueForProperty("Pie",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).Pie, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).PositionIndependentExecutable = (bool?) content.GetValueForProperty("PositionIndependentExecutable",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).PositionIndependentExecutable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("Relro")) + if (content.Contains("RelocationReadOnly")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).Relro = (bool?) content.GetValueForProperty("Relro",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).Relro, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).RelocationReadOnly = (bool?) content.GetValueForProperty("RelocationReadOnly",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).RelocationReadOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Canary")) { @@ -113,17 +113,17 @@ internal BinaryHardeningFeatures(global::System.Management.Automation.PSObject c return; } // actually deserialize - if (content.Contains("Nx")) + if (content.Contains("NoExecute")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).Nx = (bool?) content.GetValueForProperty("Nx",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).Nx, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).NoExecute = (bool?) content.GetValueForProperty("NoExecute",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).NoExecute, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("Pie")) + if (content.Contains("PositionIndependentExecutable")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).Pie = (bool?) content.GetValueForProperty("Pie",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).Pie, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).PositionIndependentExecutable = (bool?) content.GetValueForProperty("PositionIndependentExecutable",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).PositionIndependentExecutable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("Relro")) + if (content.Contains("RelocationReadOnly")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).Relro = (bool?) content.GetValueForProperty("Relro",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).Relro, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).RelocationReadOnly = (bool?) content.GetValueForProperty("RelocationReadOnly",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)this).RelocationReadOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Canary")) { diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningFeatures.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningFeatures.cs index 869ddb871722..fca9ef9efb0f 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningFeatures.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningFeatures.cs @@ -16,35 +16,37 @@ public partial class BinaryHardeningFeatures : /// Backing field for property. private bool? _canary; - /// Canary (stack canaries) flag. + /// Flag indicating if the binary was compiled with stack canaries enabled. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public bool? Canary { get => this._canary; set => this._canary = value; } - /// Backing field for property. - private bool? _nx; + /// Backing field for property. + private bool? _noExecute; - /// NX (no-execute) flag. + /// Flag indicating the binary's stack is set to NX (no-execute). [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public bool? Nx { get => this._nx; set => this._nx = value; } + public bool? NoExecute { get => this._noExecute; set => this._noExecute = value; } - /// Backing field for property. - private bool? _pie; + /// Backing field for property. + private bool? _positionIndependentExecutable; - /// PIE (position independent executable) flag. + /// + /// Flag indicating the binary was compiled to be a position independent executable. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public bool? Pie { get => this._pie; set => this._pie = value; } + public bool? PositionIndependentExecutable { get => this._positionIndependentExecutable; set => this._positionIndependentExecutable = value; } - /// Backing field for property. - private bool? _relro; + /// Backing field for property. + private bool? _relocationReadOnly; - /// RELRO (relocation read-only) flag. + /// Flag indicating the binary has enabled relocation read-only protections. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public bool? Relro { get => this._relro; set => this._relro = value; } + public bool? RelocationReadOnly { get => this._relocationReadOnly; set => this._relocationReadOnly = value; } /// Backing field for property. private bool? _stripped; - /// Stripped flag. + /// Flag indicating if debug symbols have been stripped from the binary. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public bool? Stripped { get => this._stripped; set => this._stripped = value; } @@ -58,58 +60,60 @@ public BinaryHardeningFeatures() public partial interface IBinaryHardeningFeatures : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable { - /// Canary (stack canaries) flag. + /// Flag indicating if the binary was compiled with stack canaries enabled. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Canary (stack canaries) flag.", + Description = @"Flag indicating if the binary was compiled with stack canaries enabled.", SerializedName = @"canary", PossibleTypes = new [] { typeof(bool) })] bool? Canary { get; set; } - /// NX (no-execute) flag. + /// Flag indicating the binary's stack is set to NX (no-execute). [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"NX (no-execute) flag.", - SerializedName = @"nx", + Description = @"Flag indicating the binary's stack is set to NX (no-execute).", + SerializedName = @"noExecute", PossibleTypes = new [] { typeof(bool) })] - bool? Nx { get; set; } - /// PIE (position independent executable) flag. + bool? NoExecute { get; set; } + /// + /// Flag indicating the binary was compiled to be a position independent executable. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"PIE (position independent executable) flag.", - SerializedName = @"pie", + Description = @"Flag indicating the binary was compiled to be a position independent executable.", + SerializedName = @"positionIndependentExecutable", PossibleTypes = new [] { typeof(bool) })] - bool? Pie { get; set; } - /// RELRO (relocation read-only) flag. + bool? PositionIndependentExecutable { get; set; } + /// Flag indicating the binary has enabled relocation read-only protections. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"RELRO (relocation read-only) flag.", - SerializedName = @"relro", + Description = @"Flag indicating the binary has enabled relocation read-only protections.", + SerializedName = @"relocationReadOnly", PossibleTypes = new [] { typeof(bool) })] - bool? Relro { get; set; } - /// Stripped flag. + bool? RelocationReadOnly { get; set; } + /// Flag indicating if debug symbols have been stripped from the binary. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Stripped flag.", + Description = @"Flag indicating if debug symbols have been stripped from the binary.", SerializedName = @"stripped", PossibleTypes = new [] { typeof(bool) })] bool? Stripped { get; set; } @@ -119,15 +123,17 @@ public partial interface IBinaryHardeningFeatures : internal partial interface IBinaryHardeningFeaturesInternal { - /// Canary (stack canaries) flag. + /// Flag indicating if the binary was compiled with stack canaries enabled. bool? Canary { get; set; } - /// NX (no-execute) flag. - bool? Nx { get; set; } - /// PIE (position independent executable) flag. - bool? Pie { get; set; } - /// RELRO (relocation read-only) flag. - bool? Relro { get; set; } - /// Stripped flag. + /// Flag indicating the binary's stack is set to NX (no-execute). + bool? NoExecute { get; set; } + /// + /// Flag indicating the binary was compiled to be a position independent executable. + /// + bool? PositionIndependentExecutable { get; set; } + /// Flag indicating the binary has enabled relocation read-only protections. + bool? RelocationReadOnly { get; set; } + /// Flag indicating if debug symbols have been stripped from the binary. bool? Stripped { get; set; } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningFeatures.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningFeatures.json.cs index c05a1c214655..cebc44315aab 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningFeatures.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningFeatures.json.cs @@ -65,9 +65,9 @@ internal BinaryHardeningFeatures(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnal { return; } - {_nx = If( json?.PropertyT("nx"), out var __jsonNx) ? (bool?)__jsonNx : _nx;} - {_pie = If( json?.PropertyT("pie"), out var __jsonPie) ? (bool?)__jsonPie : _pie;} - {_relro = If( json?.PropertyT("relro"), out var __jsonRelro) ? (bool?)__jsonRelro : _relro;} + {_noExecute = If( json?.PropertyT("noExecute"), out var __jsonNoExecute) ? (bool?)__jsonNoExecute : _noExecute;} + {_positionIndependentExecutable = If( json?.PropertyT("positionIndependentExecutable"), out var __jsonPositionIndependentExecutable) ? (bool?)__jsonPositionIndependentExecutable : _positionIndependentExecutable;} + {_relocationReadOnly = If( json?.PropertyT("relocationReadOnly"), out var __jsonRelocationReadOnly) ? (bool?)__jsonRelocationReadOnly : _relocationReadOnly;} {_canary = If( json?.PropertyT("canary"), out var __jsonCanary) ? (bool?)__jsonCanary : _canary;} {_stripped = If( json?.PropertyT("stripped"), out var __jsonStripped) ? (bool?)__jsonStripped : _stripped;} AfterFromJson(json); @@ -104,9 +104,9 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - AddIf( null != this._nx ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonBoolean((bool)this._nx) : null, "nx" ,container.Add ); - AddIf( null != this._pie ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonBoolean((bool)this._pie) : null, "pie" ,container.Add ); - AddIf( null != this._relro ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonBoolean((bool)this._relro) : null, "relro" ,container.Add ); + AddIf( null != this._noExecute ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonBoolean((bool)this._noExecute) : null, "noExecute" ,container.Add ); + AddIf( null != this._positionIndependentExecutable ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonBoolean((bool)this._positionIndependentExecutable) : null, "positionIndependentExecutable" ,container.Add ); + AddIf( null != this._relocationReadOnly ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonBoolean((bool)this._relocationReadOnly) : null, "relocationReadOnly" ,container.Add ); AddIf( null != this._canary ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonBoolean((bool)this._canary) : null, "canary" ,container.Add ); AddIf( null != this._stripped ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonBoolean((bool)this._stripped) : null, "stripped" ,container.Add ); AfterToJson(ref container); diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResource.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResource.PowerShell.cs index 981ee7fbf0d3..dc72485110a1 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResource.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResource.PowerShell.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; - /// binary hardening analysis result resource + /// The object representing a firmware analysis binary hardening result resource [System.ComponentModel.TypeConverter(typeof(BinaryHardeningResourceTypeConverter))] public partial class BinaryHardeningResource { @@ -120,26 +120,30 @@ internal BinaryHardeningResource(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } - if (content.Contains("Feature")) + if (content.Contains("ExecutableClass")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Feature = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Feature, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningFeaturesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).ExecutableClass = (string) content.GetValueForProperty("ExecutableClass",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).ExecutableClass, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("SecurityHardeningFeature")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeature = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures) content.GetValueForProperty("SecurityHardeningFeature",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeature, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningFeaturesTypeConverter.ConvertFrom); } if (content.Contains("BinaryHardeningId")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).BinaryHardeningId = (string) content.GetValueForProperty("BinaryHardeningId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).BinaryHardeningId, global::System.Convert.ToString); } - if (content.Contains("Architecture")) + if (content.Contains("ExecutableArchitecture")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Architecture = (string) content.GetValueForProperty("Architecture",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Architecture, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).ExecutableArchitecture = (string) content.GetValueForProperty("ExecutableArchitecture",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).ExecutableArchitecture, global::System.Convert.ToString); } if (content.Contains("FilePath")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FilePath = (string) content.GetValueForProperty("FilePath",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FilePath, global::System.Convert.ToString); } - if (content.Contains("Class")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Class = (string) content.GetValueForProperty("Class",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Class, global::System.Convert.ToString); - } if (content.Contains("Runpath")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Runpath = (string) content.GetValueForProperty("Runpath",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Runpath, global::System.Convert.ToString); @@ -148,25 +152,25 @@ internal BinaryHardeningResource(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Rpath = (string) content.GetValueForProperty("Rpath",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Rpath, global::System.Convert.ToString); } - if (content.Contains("FeatureNx")) + if (content.Contains("SecurityHardeningFeatureNoExecute")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeatureNx = (bool?) content.GetValueForProperty("FeatureNx",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeatureNx, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeatureNoExecute = (bool?) content.GetValueForProperty("SecurityHardeningFeatureNoExecute",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeatureNoExecute, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("FeaturePie")) + if (content.Contains("SecurityHardeningFeaturePositionIndependentExecutable")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeaturePie = (bool?) content.GetValueForProperty("FeaturePie",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeaturePie, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeaturePositionIndependentExecutable = (bool?) content.GetValueForProperty("SecurityHardeningFeaturePositionIndependentExecutable",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeaturePositionIndependentExecutable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("FeatureRelro")) + if (content.Contains("SecurityHardeningFeatureRelocationReadOnly")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeatureRelro = (bool?) content.GetValueForProperty("FeatureRelro",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeatureRelro, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeatureRelocationReadOnly = (bool?) content.GetValueForProperty("SecurityHardeningFeatureRelocationReadOnly",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeatureRelocationReadOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("FeatureCanary")) + if (content.Contains("SecurityHardeningFeatureCanary")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeatureCanary = (bool?) content.GetValueForProperty("FeatureCanary",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeatureCanary, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeatureCanary = (bool?) content.GetValueForProperty("SecurityHardeningFeatureCanary",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeatureCanary, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("FeatureStripped")) + if (content.Contains("SecurityHardeningFeatureStripped")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeatureStripped = (bool?) content.GetValueForProperty("FeatureStripped",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeatureStripped, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeatureStripped = (bool?) content.GetValueForProperty("SecurityHardeningFeatureStripped",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeatureStripped, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializeDictionary(content); } @@ -229,26 +233,30 @@ internal BinaryHardeningResource(global::System.Management.Automation.PSObject c { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } - if (content.Contains("Feature")) + if (content.Contains("ExecutableClass")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Feature = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Feature, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningFeaturesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).ExecutableClass = (string) content.GetValueForProperty("ExecutableClass",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).ExecutableClass, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("SecurityHardeningFeature")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeature = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures) content.GetValueForProperty("SecurityHardeningFeature",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeature, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningFeaturesTypeConverter.ConvertFrom); } if (content.Contains("BinaryHardeningId")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).BinaryHardeningId = (string) content.GetValueForProperty("BinaryHardeningId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).BinaryHardeningId, global::System.Convert.ToString); } - if (content.Contains("Architecture")) + if (content.Contains("ExecutableArchitecture")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Architecture = (string) content.GetValueForProperty("Architecture",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Architecture, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).ExecutableArchitecture = (string) content.GetValueForProperty("ExecutableArchitecture",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).ExecutableArchitecture, global::System.Convert.ToString); } if (content.Contains("FilePath")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FilePath = (string) content.GetValueForProperty("FilePath",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FilePath, global::System.Convert.ToString); } - if (content.Contains("Class")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Class = (string) content.GetValueForProperty("Class",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Class, global::System.Convert.ToString); - } if (content.Contains("Runpath")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Runpath = (string) content.GetValueForProperty("Runpath",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Runpath, global::System.Convert.ToString); @@ -257,25 +265,25 @@ internal BinaryHardeningResource(global::System.Management.Automation.PSObject c { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Rpath = (string) content.GetValueForProperty("Rpath",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).Rpath, global::System.Convert.ToString); } - if (content.Contains("FeatureNx")) + if (content.Contains("SecurityHardeningFeatureNoExecute")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeatureNx = (bool?) content.GetValueForProperty("FeatureNx",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeatureNx, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeatureNoExecute = (bool?) content.GetValueForProperty("SecurityHardeningFeatureNoExecute",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeatureNoExecute, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("FeaturePie")) + if (content.Contains("SecurityHardeningFeaturePositionIndependentExecutable")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeaturePie = (bool?) content.GetValueForProperty("FeaturePie",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeaturePie, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeaturePositionIndependentExecutable = (bool?) content.GetValueForProperty("SecurityHardeningFeaturePositionIndependentExecutable",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeaturePositionIndependentExecutable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("FeatureRelro")) + if (content.Contains("SecurityHardeningFeatureRelocationReadOnly")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeatureRelro = (bool?) content.GetValueForProperty("FeatureRelro",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeatureRelro, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeatureRelocationReadOnly = (bool?) content.GetValueForProperty("SecurityHardeningFeatureRelocationReadOnly",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeatureRelocationReadOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("FeatureCanary")) + if (content.Contains("SecurityHardeningFeatureCanary")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeatureCanary = (bool?) content.GetValueForProperty("FeatureCanary",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeatureCanary, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeatureCanary = (bool?) content.GetValueForProperty("SecurityHardeningFeatureCanary",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeatureCanary, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("FeatureStripped")) + if (content.Contains("SecurityHardeningFeatureStripped")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeatureStripped = (bool?) content.GetValueForProperty("FeatureStripped",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).FeatureStripped, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeatureStripped = (bool?) content.GetValueForProperty("SecurityHardeningFeatureStripped",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal)this).SecurityHardeningFeatureStripped, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } @@ -330,7 +338,7 @@ public override string ToString() return ToJsonString(); } } - /// binary hardening analysis result resource + /// The object representing a firmware analysis binary hardening result resource [System.ComponentModel.TypeConverter(typeof(BinaryHardeningResourceTypeConverter))] public partial interface IBinaryHardeningResource diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResource.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResource.cs index d46511e4ad2d..dfbc4df0e264 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResource.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResource.cs @@ -7,50 +7,31 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// binary hardening analysis result resource + /// The object representing a firmware analysis binary hardening result resource public partial class BinaryHardeningResource : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResource, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Resource(); - - /// The architecture of the uploaded firmware. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public string Architecture { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).Architecture; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).Architecture = value ?? null; } + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource(); /// ID for the binary hardening result. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string BinaryHardeningId { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).BinaryHardeningId; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).BinaryHardeningId = value ?? null; } - /// The executable class to indicate 32 or 64 bit. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public string Class { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).Class; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).Class = value ?? null; } - - /// Canary (stack canaries) flag. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public bool? FeatureCanary { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).FeatureCanary; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).FeatureCanary = value ?? default(bool); } - - /// NX (no-execute) flag. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public bool? FeatureNx { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).FeatureNx; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).FeatureNx = value ?? default(bool); } - - /// PIE (position independent executable) flag. + /// The architecture of the binary being reported on. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public bool? FeaturePie { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).FeaturePie; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).FeaturePie = value ?? default(bool); } + public string ExecutableArchitecture { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).ExecutableArchitecture; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).ExecutableArchitecture = value ?? null; } - /// RELRO (relocation read-only) flag. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public bool? FeatureRelro { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).FeatureRelro; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).FeatureRelro = value ?? default(bool); } - - /// Stripped flag. + /// The executable class to indicate 32 or 64 bit. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public bool? FeatureStripped { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).FeatureStripped; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).FeatureStripped = value ?? default(bool); } + public string ExecutableClass { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).ExecutableClass; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).ExecutableClass = value ?? null; } - /// The executable path. + /// The path to the binary in the firmware. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string FilePath { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).FilePath; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).FilePath = value ?? null; } @@ -58,80 +39,132 @@ public partial class BinaryHardeningResource : /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; } - - /// Internal Acessors for Feature - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal.Feature { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).Feature; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).Feature = value; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResult Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningResult()); set { {_property = value;} } } + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for SecurityHardeningFeature + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceInternal.SecurityHardeningFeature { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).SecurityHardeningFeature; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).SecurityHardeningFeature = value ?? null /* model class */; } + /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name = value ?? null; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type = value ?? null; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResult _property; - /// The properties of a binary hardening result found within a firmware image + /// The resource-specific properties for this resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResult Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningResult()); set => this._property = value; } - /// The rpath of the uploaded firmware. + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).ProvisioningState; } + + /// + /// The rpath property of the uploaded binary, which is a deprecated method of specifying additional paths to load objects + /// at runtime. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string Rpath { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).Rpath; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).Rpath = value ?? null; } - /// The runpath of the uploaded firmware. + /// + /// The runpath property of the uploaded binary, which is a method of specifying additional paths to load objects at runtime. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string Runpath { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).Runpath; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).Runpath = value ?? null; } + /// Flag indicating if the binary was compiled with stack canaries enabled. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public bool? SecurityHardeningFeatureCanary { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).SecurityHardeningFeatureCanary; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).SecurityHardeningFeatureCanary = value ?? default(bool); } + + /// Flag indicating the binary's stack is set to NX (no-execute). + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public bool? SecurityHardeningFeatureNoExecute { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).SecurityHardeningFeatureNoExecute; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).SecurityHardeningFeatureNoExecute = value ?? default(bool); } + + /// + /// Flag indicating the binary was compiled to be a position independent executable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public bool? SecurityHardeningFeaturePositionIndependentExecutable { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).SecurityHardeningFeaturePositionIndependentExecutable; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).SecurityHardeningFeaturePositionIndependentExecutable = value ?? default(bool); } + + /// Flag indicating the binary has enabled relocation read-only protections. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public bool? SecurityHardeningFeatureRelocationReadOnly { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).SecurityHardeningFeatureRelocationReadOnly; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).SecurityHardeningFeatureRelocationReadOnly = value ?? default(bool); } + + /// Flag indicating if debug symbols have been stripped from the binary. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public bool? SecurityHardeningFeatureStripped { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).SecurityHardeningFeatureStripped; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)Property).SecurityHardeningFeatureStripped = value ?? default(bool); } + /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; } + internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type; } /// Creates an new instance. public BinaryHardeningResource() @@ -147,37 +180,37 @@ public BinaryHardeningResource() /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); } } - /// binary hardening analysis result resource + /// The object representing a firmware analysis binary hardening result resource public partial interface IBinaryHardeningResource : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResource + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource { - /// The architecture of the uploaded firmware. + /// ID for the binary hardening result. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The architecture of the uploaded firmware.", - SerializedName = @"architecture", + Description = @"ID for the binary hardening result.", + SerializedName = @"binaryHardeningId", PossibleTypes = new [] { typeof(string) })] - string Architecture { get; set; } - /// ID for the binary hardening result. + string BinaryHardeningId { get; set; } + /// The architecture of the binary being reported on. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"ID for the binary hardening result.", - SerializedName = @"binaryHardeningId", + Description = @"The architecture of the binary being reported on.", + SerializedName = @"executableArchitecture", PossibleTypes = new [] { typeof(string) })] - string BinaryHardeningId { get; set; } + string ExecutableArchitecture { get; set; } /// The executable class to indicate 32 or 64 bit. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -186,129 +219,160 @@ public partial interface IBinaryHardeningResource : Create = true, Update = true, Description = @"The executable class to indicate 32 or 64 bit.", - SerializedName = @"class", + SerializedName = @"executableClass", PossibleTypes = new [] { typeof(string) })] - string Class { get; set; } - /// Canary (stack canaries) flag. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("x86", "x64")] + string ExecutableClass { get; set; } + /// The path to the binary in the firmware. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Canary (stack canaries) flag.", - SerializedName = @"canary", - PossibleTypes = new [] { typeof(bool) })] - bool? FeatureCanary { get; set; } - /// NX (no-execute) flag. + Description = @"The path to the binary in the firmware.", + SerializedName = @"filePath", + PossibleTypes = new [] { typeof(string) })] + string FilePath { get; set; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; } + /// + /// The rpath property of the uploaded binary, which is a deprecated method of specifying additional paths to load objects + /// at runtime. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"NX (no-execute) flag.", - SerializedName = @"nx", - PossibleTypes = new [] { typeof(bool) })] - bool? FeatureNx { get; set; } - /// PIE (position independent executable) flag. + Description = @"The rpath property of the uploaded binary, which is a deprecated method of specifying additional paths to load objects at runtime.", + SerializedName = @"rpath", + PossibleTypes = new [] { typeof(string) })] + string Rpath { get; set; } + /// + /// The runpath property of the uploaded binary, which is a method of specifying additional paths to load objects at runtime. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"PIE (position independent executable) flag.", - SerializedName = @"pie", - PossibleTypes = new [] { typeof(bool) })] - bool? FeaturePie { get; set; } - /// RELRO (relocation read-only) flag. + Description = @"The runpath property of the uploaded binary, which is a method of specifying additional paths to load objects at runtime.", + SerializedName = @"runpath", + PossibleTypes = new [] { typeof(string) })] + string Runpath { get; set; } + /// Flag indicating if the binary was compiled with stack canaries enabled. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"RELRO (relocation read-only) flag.", - SerializedName = @"relro", + Description = @"Flag indicating if the binary was compiled with stack canaries enabled.", + SerializedName = @"canary", PossibleTypes = new [] { typeof(bool) })] - bool? FeatureRelro { get; set; } - /// Stripped flag. + bool? SecurityHardeningFeatureCanary { get; set; } + /// Flag indicating the binary's stack is set to NX (no-execute). [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Stripped flag.", - SerializedName = @"stripped", + Description = @"Flag indicating the binary's stack is set to NX (no-execute).", + SerializedName = @"noExecute", PossibleTypes = new [] { typeof(bool) })] - bool? FeatureStripped { get; set; } - /// The executable path. + bool? SecurityHardeningFeatureNoExecute { get; set; } + /// + /// Flag indicating the binary was compiled to be a position independent executable. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The executable path.", - SerializedName = @"filePath", - PossibleTypes = new [] { typeof(string) })] - string FilePath { get; set; } - /// The rpath of the uploaded firmware. + Description = @"Flag indicating the binary was compiled to be a position independent executable.", + SerializedName = @"positionIndependentExecutable", + PossibleTypes = new [] { typeof(bool) })] + bool? SecurityHardeningFeaturePositionIndependentExecutable { get; set; } + /// Flag indicating the binary has enabled relocation read-only protections. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The rpath of the uploaded firmware.", - SerializedName = @"rpath", - PossibleTypes = new [] { typeof(string) })] - string Rpath { get; set; } - /// The runpath of the uploaded firmware. + Description = @"Flag indicating the binary has enabled relocation read-only protections.", + SerializedName = @"relocationReadOnly", + PossibleTypes = new [] { typeof(bool) })] + bool? SecurityHardeningFeatureRelocationReadOnly { get; set; } + /// Flag indicating if debug symbols have been stripped from the binary. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The runpath of the uploaded firmware.", - SerializedName = @"runpath", - PossibleTypes = new [] { typeof(string) })] - string Runpath { get; set; } + Description = @"Flag indicating if debug symbols have been stripped from the binary.", + SerializedName = @"stripped", + PossibleTypes = new [] { typeof(bool) })] + bool? SecurityHardeningFeatureStripped { get; set; } } - /// binary hardening analysis result resource + /// The object representing a firmware analysis binary hardening result resource internal partial interface IBinaryHardeningResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResourceInternal { - /// The architecture of the uploaded firmware. - string Architecture { get; set; } /// ID for the binary hardening result. string BinaryHardeningId { get; set; } + /// The architecture of the binary being reported on. + string ExecutableArchitecture { get; set; } /// The executable class to indicate 32 or 64 bit. - string Class { get; set; } - /// Binary hardening features. - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures Feature { get; set; } - /// Canary (stack canaries) flag. - bool? FeatureCanary { get; set; } - /// NX (no-execute) flag. - bool? FeatureNx { get; set; } - /// PIE (position independent executable) flag. - bool? FeaturePie { get; set; } - /// RELRO (relocation read-only) flag. - bool? FeatureRelro { get; set; } - /// Stripped flag. - bool? FeatureStripped { get; set; } - /// The executable path. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("x86", "x64")] + string ExecutableClass { get; set; } + /// The path to the binary in the firmware. string FilePath { get; set; } - /// The properties of a binary hardening result found within a firmware image + /// The resource-specific properties for this resource. Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResult Property { get; set; } - /// The rpath of the uploaded firmware. + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; set; } + /// + /// The rpath property of the uploaded binary, which is a deprecated method of specifying additional paths to load objects + /// at runtime. + /// string Rpath { get; set; } - /// The runpath of the uploaded firmware. + /// + /// The runpath property of the uploaded binary, which is a method of specifying additional paths to load objects at runtime. + /// string Runpath { get; set; } + /// The security hardening features of the binary. + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures SecurityHardeningFeature { get; set; } + /// Flag indicating if the binary was compiled with stack canaries enabled. + bool? SecurityHardeningFeatureCanary { get; set; } + /// Flag indicating the binary's stack is set to NX (no-execute). + bool? SecurityHardeningFeatureNoExecute { get; set; } + /// + /// Flag indicating the binary was compiled to be a position independent executable. + /// + bool? SecurityHardeningFeaturePositionIndependentExecutable { get; set; } + /// Flag indicating the binary has enabled relocation read-only protections. + bool? SecurityHardeningFeatureRelocationReadOnly { get; set; } + /// Flag indicating if debug symbols have been stripped from the binary. + bool? SecurityHardeningFeatureStripped { get; set; } } } \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResource.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResource.json.cs index 0d75fce85132..6c04d84bd11e 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResource.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResource.json.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// binary hardening analysis result resource + /// The object representing a firmware analysis binary hardening result resource public partial class BinaryHardeningResource { @@ -65,7 +65,7 @@ internal BinaryHardeningResource(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnal { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Resource(json); + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource(json); {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningResult.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResourceListResult.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResourceListResult.PowerShell.cs new file mode 100644 index 000000000000..bc763f15c5da --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResourceListResult.PowerShell.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + + /// The response of a BinaryHardeningResource list operation. + [System.ComponentModel.TypeConverter(typeof(BinaryHardeningResourceListResultTypeConverter))] + public partial class BinaryHardeningResourceListResult + { + + /// + /// 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 BinaryHardeningResourceListResult(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.FirmwareAnalysis.Models.IBinaryHardeningResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningResourceTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal BinaryHardeningResourceListResult(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.FirmwareAnalysis.Models.IBinaryHardeningResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningResourceTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new BinaryHardeningResourceListResult(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.FirmwareAnalysis.Models.IBinaryHardeningResourceListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new BinaryHardeningResourceListResult(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.FirmwareAnalysis.Models.IBinaryHardeningResourceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a BinaryHardeningResource list operation. + [System.ComponentModel.TypeConverter(typeof(BinaryHardeningResourceListResultTypeConverter))] + public partial interface IBinaryHardeningResourceListResult + + { + + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResourceListResult.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResourceListResult.TypeConverter.cs new file mode 100644 index 000000000000..6fa0f6cc8351 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResourceListResult.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class BinaryHardeningResourceListResultTypeConverter : 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.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Models.IBinaryHardeningResourceListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return BinaryHardeningResourceListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return BinaryHardeningResourceListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return BinaryHardeningResourceListResult.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/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningListResult.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResourceListResult.cs similarity index 61% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningListResult.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResourceListResult.cs index 5cfbd312295a..6e93884a581b 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningListResult.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResourceListResult.cs @@ -7,70 +7,67 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// List of binary hardening results. - public partial class BinaryHardeningListResult : - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningListResult, - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningListResultInternal + /// The response of a BinaryHardeningResource list operation. + public partial class BinaryHardeningResourceListResult : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceListResult, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceListResultInternal { - /// Internal Acessors for Value - System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningListResultInternal.Value { get => this._value; set { {_value = value;} } } - /// Backing field for property. private string _nextLink; - /// The uri to fetch the next page of resources. + /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. private System.Collections.Generic.List _value; - /// The list of binary hardening results. + /// The BinaryHardeningResource items on this page [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public System.Collections.Generic.List Value { get => this._value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } - /// Creates an new instance. - public BinaryHardeningListResult() + /// Creates an new instance. + public BinaryHardeningResourceListResult() { } } - /// List of binary hardening results. - public partial interface IBinaryHardeningListResult : + /// The response of a BinaryHardeningResource list operation. + public partial interface IBinaryHardeningResourceListResult : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable { - /// The uri to fetch the next page of resources. + /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The uri to fetch the next page of resources.", + Description = @"The link to the next page of items", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] string NextLink { get; set; } - /// The list of binary hardening results. + /// The BinaryHardeningResource items on this page [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = true, + Required = true, + ReadOnly = false, Read = true, - Create = false, - Update = false, - Description = @"The list of binary hardening results.", + Create = true, + Update = true, + Description = @"The BinaryHardeningResource items on this page", SerializedName = @"value", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResource) })] - System.Collections.Generic.List Value { get; } + System.Collections.Generic.List Value { get; set; } } - /// List of binary hardening results. - internal partial interface IBinaryHardeningListResultInternal + /// The response of a BinaryHardeningResource list operation. + internal partial interface IBinaryHardeningResourceListResultInternal { - /// The uri to fetch the next page of resources. + /// The link to the next page of items string NextLink { get; set; } - /// The list of binary hardening results. + /// The BinaryHardeningResource items on this page System.Collections.Generic.List Value { get; set; } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningListResult.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResourceListResult.json.cs similarity index 84% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningListResult.json.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResourceListResult.json.cs index df6b830df78a..74c57e61cfdd 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningListResult.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResourceListResult.json.cs @@ -7,8 +7,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// List of binary hardening results. - public partial class BinaryHardeningListResult + /// The response of a BinaryHardeningResource list operation. + public partial class BinaryHardeningResourceListResult { /// @@ -54,10 +54,10 @@ public partial class BinaryHardeningListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject instance to deserialize from. - internal BinaryHardeningListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) + internal BinaryHardeningResourceListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -71,25 +71,25 @@ internal BinaryHardeningListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAn } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new BinaryHardeningListResult(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new BinaryHardeningResourceListResult(json) : null; } /// - /// Serializes this instance of into a . + /// 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 . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode) { @@ -101,17 +101,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) + if (null != this._value) { - if (null != this._value) + var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); - foreach( var __x in this._value ) - { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); - } - container.Add("value",__w); + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); } + container.Add("value",__w); } AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); AfterToJson(ref container); diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResult.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResult.PowerShell.cs index 677893afe0e1..e258ec14d5df 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResult.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResult.PowerShell.cs @@ -76,25 +76,25 @@ internal BinaryHardeningResult(global::System.Collections.IDictionary content) return; } // actually deserialize - if (content.Contains("Feature")) + if (content.Contains("SecurityHardeningFeature")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).Feature = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).Feature, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningFeaturesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeature = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures) content.GetValueForProperty("SecurityHardeningFeature",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeature, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningFeaturesTypeConverter.ConvertFrom); } if (content.Contains("BinaryHardeningId")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).BinaryHardeningId = (string) content.GetValueForProperty("BinaryHardeningId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).BinaryHardeningId, global::System.Convert.ToString); } - if (content.Contains("Architecture")) + if (content.Contains("ExecutableArchitecture")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).Architecture = (string) content.GetValueForProperty("Architecture",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).Architecture, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).ExecutableArchitecture = (string) content.GetValueForProperty("ExecutableArchitecture",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).ExecutableArchitecture, global::System.Convert.ToString); } if (content.Contains("FilePath")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FilePath = (string) content.GetValueForProperty("FilePath",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FilePath, global::System.Convert.ToString); } - if (content.Contains("Class")) + if (content.Contains("ExecutableClass")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).Class = (string) content.GetValueForProperty("Class",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).Class, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).ExecutableClass = (string) content.GetValueForProperty("ExecutableClass",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).ExecutableClass, global::System.Convert.ToString); } if (content.Contains("Runpath")) { @@ -104,25 +104,29 @@ internal BinaryHardeningResult(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).Rpath = (string) content.GetValueForProperty("Rpath",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).Rpath, global::System.Convert.ToString); } - if (content.Contains("FeatureNx")) + if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeatureNx = (bool?) content.GetValueForProperty("FeatureNx",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeatureNx, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).ProvisioningState, global::System.Convert.ToString); } - if (content.Contains("FeaturePie")) + if (content.Contains("SecurityHardeningFeatureNoExecute")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeaturePie = (bool?) content.GetValueForProperty("FeaturePie",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeaturePie, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeatureNoExecute = (bool?) content.GetValueForProperty("SecurityHardeningFeatureNoExecute",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeatureNoExecute, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("FeatureRelro")) + if (content.Contains("SecurityHardeningFeaturePositionIndependentExecutable")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeatureRelro = (bool?) content.GetValueForProperty("FeatureRelro",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeatureRelro, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeaturePositionIndependentExecutable = (bool?) content.GetValueForProperty("SecurityHardeningFeaturePositionIndependentExecutable",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeaturePositionIndependentExecutable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("FeatureCanary")) + if (content.Contains("SecurityHardeningFeatureRelocationReadOnly")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeatureCanary = (bool?) content.GetValueForProperty("FeatureCanary",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeatureCanary, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeatureRelocationReadOnly = (bool?) content.GetValueForProperty("SecurityHardeningFeatureRelocationReadOnly",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeatureRelocationReadOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("FeatureStripped")) + if (content.Contains("SecurityHardeningFeatureCanary")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeatureStripped = (bool?) content.GetValueForProperty("FeatureStripped",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeatureStripped, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeatureCanary = (bool?) content.GetValueForProperty("SecurityHardeningFeatureCanary",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeatureCanary, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityHardeningFeatureStripped")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeatureStripped = (bool?) content.GetValueForProperty("SecurityHardeningFeatureStripped",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeatureStripped, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializeDictionary(content); } @@ -141,25 +145,25 @@ internal BinaryHardeningResult(global::System.Management.Automation.PSObject con return; } // actually deserialize - if (content.Contains("Feature")) + if (content.Contains("SecurityHardeningFeature")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).Feature = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).Feature, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningFeaturesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeature = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures) content.GetValueForProperty("SecurityHardeningFeature",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeature, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningFeaturesTypeConverter.ConvertFrom); } if (content.Contains("BinaryHardeningId")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).BinaryHardeningId = (string) content.GetValueForProperty("BinaryHardeningId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).BinaryHardeningId, global::System.Convert.ToString); } - if (content.Contains("Architecture")) + if (content.Contains("ExecutableArchitecture")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).Architecture = (string) content.GetValueForProperty("Architecture",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).Architecture, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).ExecutableArchitecture = (string) content.GetValueForProperty("ExecutableArchitecture",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).ExecutableArchitecture, global::System.Convert.ToString); } if (content.Contains("FilePath")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FilePath = (string) content.GetValueForProperty("FilePath",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FilePath, global::System.Convert.ToString); } - if (content.Contains("Class")) + if (content.Contains("ExecutableClass")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).Class = (string) content.GetValueForProperty("Class",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).Class, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).ExecutableClass = (string) content.GetValueForProperty("ExecutableClass",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).ExecutableClass, global::System.Convert.ToString); } if (content.Contains("Runpath")) { @@ -169,25 +173,29 @@ internal BinaryHardeningResult(global::System.Management.Automation.PSObject con { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).Rpath = (string) content.GetValueForProperty("Rpath",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).Rpath, global::System.Convert.ToString); } - if (content.Contains("FeatureNx")) + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("SecurityHardeningFeatureNoExecute")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeatureNx = (bool?) content.GetValueForProperty("FeatureNx",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeatureNx, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeatureNoExecute = (bool?) content.GetValueForProperty("SecurityHardeningFeatureNoExecute",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeatureNoExecute, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("FeaturePie")) + if (content.Contains("SecurityHardeningFeaturePositionIndependentExecutable")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeaturePie = (bool?) content.GetValueForProperty("FeaturePie",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeaturePie, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeaturePositionIndependentExecutable = (bool?) content.GetValueForProperty("SecurityHardeningFeaturePositionIndependentExecutable",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeaturePositionIndependentExecutable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("FeatureRelro")) + if (content.Contains("SecurityHardeningFeatureRelocationReadOnly")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeatureRelro = (bool?) content.GetValueForProperty("FeatureRelro",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeatureRelro, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeatureRelocationReadOnly = (bool?) content.GetValueForProperty("SecurityHardeningFeatureRelocationReadOnly",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeatureRelocationReadOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("FeatureCanary")) + if (content.Contains("SecurityHardeningFeatureCanary")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeatureCanary = (bool?) content.GetValueForProperty("FeatureCanary",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeatureCanary, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeatureCanary = (bool?) content.GetValueForProperty("SecurityHardeningFeatureCanary",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeatureCanary, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("FeatureStripped")) + if (content.Contains("SecurityHardeningFeatureStripped")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeatureStripped = (bool?) content.GetValueForProperty("FeatureStripped",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).FeatureStripped, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeatureStripped = (bool?) content.GetValueForProperty("SecurityHardeningFeatureStripped",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal)this).SecurityHardeningFeatureStripped, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResult.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResult.cs index 77977d8f502d..76940c4f80c2 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResult.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResult.cs @@ -13,13 +13,6 @@ public partial class BinaryHardeningResult : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal { - /// Backing field for property. - private string _architecture; - - /// The architecture of the uploaded firmware. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public string Architecture { get => this._architecture; set => this._architecture = value; } - /// Backing field for property. private string _binaryHardeningId; @@ -27,64 +20,88 @@ public partial class BinaryHardeningResult : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string BinaryHardeningId { get => this._binaryHardeningId; set => this._binaryHardeningId = value; } - /// Backing field for property. - private string _class; + /// Backing field for property. + private string _executableArchitecture; - /// The executable class to indicate 32 or 64 bit. + /// The architecture of the binary being reported on. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public string Class { get => this._class; set => this._class = value; } + public string ExecutableArchitecture { get => this._executableArchitecture; set => this._executableArchitecture = value; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures _feature; + /// Backing field for property. + private string _executableClass; - /// Binary hardening features. + /// The executable class to indicate 32 or 64 bit. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures Feature { get => (this._feature = this._feature ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningFeatures()); set => this._feature = value; } - - /// Canary (stack canaries) flag. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public bool? FeatureCanary { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)Feature).Canary; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)Feature).Canary = value ?? default(bool); } - - /// NX (no-execute) flag. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public bool? FeatureNx { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)Feature).Nx; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)Feature).Nx = value ?? default(bool); } - - /// PIE (position independent executable) flag. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public bool? FeaturePie { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)Feature).Pie; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)Feature).Pie = value ?? default(bool); } - - /// RELRO (relocation read-only) flag. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public bool? FeatureRelro { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)Feature).Relro; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)Feature).Relro = value ?? default(bool); } - - /// Stripped flag. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public bool? FeatureStripped { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)Feature).Stripped; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)Feature).Stripped = value ?? default(bool); } + public string ExecutableClass { get => this._executableClass; set => this._executableClass = value; } /// Backing field for property. private string _filePath; - /// The executable path. + /// The path to the binary in the firmware. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string FilePath { get => this._filePath; set => this._filePath = value; } - /// Internal Acessors for Feature - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal.Feature { get => (this._feature = this._feature ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningFeatures()); set { {_feature = value;} } } + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for SecurityHardeningFeature + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResultInternal.SecurityHardeningFeature { get => (this._securityHardeningFeature = this._securityHardeningFeature ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningFeatures()); set { {_securityHardeningFeature = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } /// Backing field for property. private string _rpath; - /// The rpath of the uploaded firmware. + /// + /// The rpath property of the uploaded binary, which is a deprecated method of specifying additional paths to load objects + /// at runtime. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string Rpath { get => this._rpath; set => this._rpath = value; } /// Backing field for property. private string _runpath; - /// The runpath of the uploaded firmware. + /// + /// The runpath property of the uploaded binary, which is a method of specifying additional paths to load objects at runtime. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string Runpath { get => this._runpath; set => this._runpath = value; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures _securityHardeningFeature; + + /// The security hardening features of the binary. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures SecurityHardeningFeature { get => (this._securityHardeningFeature = this._securityHardeningFeature ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningFeatures()); set => this._securityHardeningFeature = value; } + + /// Flag indicating if the binary was compiled with stack canaries enabled. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public bool? SecurityHardeningFeatureCanary { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)SecurityHardeningFeature).Canary; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)SecurityHardeningFeature).Canary = value ?? default(bool); } + + /// Flag indicating the binary's stack is set to NX (no-execute). + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public bool? SecurityHardeningFeatureNoExecute { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)SecurityHardeningFeature).NoExecute; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)SecurityHardeningFeature).NoExecute = value ?? default(bool); } + + /// + /// Flag indicating the binary was compiled to be a position independent executable. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public bool? SecurityHardeningFeaturePositionIndependentExecutable { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)SecurityHardeningFeature).PositionIndependentExecutable; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)SecurityHardeningFeature).PositionIndependentExecutable = value ?? default(bool); } + + /// Flag indicating the binary has enabled relocation read-only protections. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public bool? SecurityHardeningFeatureRelocationReadOnly { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)SecurityHardeningFeature).RelocationReadOnly; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)SecurityHardeningFeature).RelocationReadOnly = value ?? default(bool); } + + /// Flag indicating if debug symbols have been stripped from the binary. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public bool? SecurityHardeningFeatureStripped { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)SecurityHardeningFeature).Stripped; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeaturesInternal)SecurityHardeningFeature).Stripped = value ?? default(bool); } + /// Creates an new instance. public BinaryHardeningResult() { @@ -95,28 +112,28 @@ public BinaryHardeningResult() public partial interface IBinaryHardeningResult : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable { - /// The architecture of the uploaded firmware. + /// ID for the binary hardening result. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The architecture of the uploaded firmware.", - SerializedName = @"architecture", + Description = @"ID for the binary hardening result.", + SerializedName = @"binaryHardeningId", PossibleTypes = new [] { typeof(string) })] - string Architecture { get; set; } - /// ID for the binary hardening result. + string BinaryHardeningId { get; set; } + /// The architecture of the binary being reported on. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"ID for the binary hardening result.", - SerializedName = @"binaryHardeningId", + Description = @"The architecture of the binary being reported on.", + SerializedName = @"executableArchitecture", PossibleTypes = new [] { typeof(string) })] - string BinaryHardeningId { get; set; } + string ExecutableArchitecture { get; set; } /// The executable class to indicate 32 or 64 bit. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -125,127 +142,158 @@ public partial interface IBinaryHardeningResult : Create = true, Update = true, Description = @"The executable class to indicate 32 or 64 bit.", - SerializedName = @"class", + SerializedName = @"executableClass", PossibleTypes = new [] { typeof(string) })] - string Class { get; set; } - /// Canary (stack canaries) flag. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("x86", "x64")] + string ExecutableClass { get; set; } + /// The path to the binary in the firmware. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Canary (stack canaries) flag.", - SerializedName = @"canary", - PossibleTypes = new [] { typeof(bool) })] - bool? FeatureCanary { get; set; } - /// NX (no-execute) flag. + Description = @"The path to the binary in the firmware.", + SerializedName = @"filePath", + PossibleTypes = new [] { typeof(string) })] + string FilePath { get; set; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; } + /// + /// The rpath property of the uploaded binary, which is a deprecated method of specifying additional paths to load objects + /// at runtime. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"NX (no-execute) flag.", - SerializedName = @"nx", - PossibleTypes = new [] { typeof(bool) })] - bool? FeatureNx { get; set; } - /// PIE (position independent executable) flag. + Description = @"The rpath property of the uploaded binary, which is a deprecated method of specifying additional paths to load objects at runtime.", + SerializedName = @"rpath", + PossibleTypes = new [] { typeof(string) })] + string Rpath { get; set; } + /// + /// The runpath property of the uploaded binary, which is a method of specifying additional paths to load objects at runtime. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"PIE (position independent executable) flag.", - SerializedName = @"pie", - PossibleTypes = new [] { typeof(bool) })] - bool? FeaturePie { get; set; } - /// RELRO (relocation read-only) flag. + Description = @"The runpath property of the uploaded binary, which is a method of specifying additional paths to load objects at runtime.", + SerializedName = @"runpath", + PossibleTypes = new [] { typeof(string) })] + string Runpath { get; set; } + /// Flag indicating if the binary was compiled with stack canaries enabled. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"RELRO (relocation read-only) flag.", - SerializedName = @"relro", + Description = @"Flag indicating if the binary was compiled with stack canaries enabled.", + SerializedName = @"canary", PossibleTypes = new [] { typeof(bool) })] - bool? FeatureRelro { get; set; } - /// Stripped flag. + bool? SecurityHardeningFeatureCanary { get; set; } + /// Flag indicating the binary's stack is set to NX (no-execute). [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Stripped flag.", - SerializedName = @"stripped", + Description = @"Flag indicating the binary's stack is set to NX (no-execute).", + SerializedName = @"noExecute", PossibleTypes = new [] { typeof(bool) })] - bool? FeatureStripped { get; set; } - /// The executable path. + bool? SecurityHardeningFeatureNoExecute { get; set; } + /// + /// Flag indicating the binary was compiled to be a position independent executable. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The executable path.", - SerializedName = @"filePath", - PossibleTypes = new [] { typeof(string) })] - string FilePath { get; set; } - /// The rpath of the uploaded firmware. + Description = @"Flag indicating the binary was compiled to be a position independent executable.", + SerializedName = @"positionIndependentExecutable", + PossibleTypes = new [] { typeof(bool) })] + bool? SecurityHardeningFeaturePositionIndependentExecutable { get; set; } + /// Flag indicating the binary has enabled relocation read-only protections. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The rpath of the uploaded firmware.", - SerializedName = @"rpath", - PossibleTypes = new [] { typeof(string) })] - string Rpath { get; set; } - /// The runpath of the uploaded firmware. + Description = @"Flag indicating the binary has enabled relocation read-only protections.", + SerializedName = @"relocationReadOnly", + PossibleTypes = new [] { typeof(bool) })] + bool? SecurityHardeningFeatureRelocationReadOnly { get; set; } + /// Flag indicating if debug symbols have been stripped from the binary. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The runpath of the uploaded firmware.", - SerializedName = @"runpath", - PossibleTypes = new [] { typeof(string) })] - string Runpath { get; set; } + Description = @"Flag indicating if debug symbols have been stripped from the binary.", + SerializedName = @"stripped", + PossibleTypes = new [] { typeof(bool) })] + bool? SecurityHardeningFeatureStripped { get; set; } } /// Binary hardening of a firmware. internal partial interface IBinaryHardeningResultInternal { - /// The architecture of the uploaded firmware. - string Architecture { get; set; } /// ID for the binary hardening result. string BinaryHardeningId { get; set; } + /// The architecture of the binary being reported on. + string ExecutableArchitecture { get; set; } /// The executable class to indicate 32 or 64 bit. - string Class { get; set; } - /// Binary hardening features. - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures Feature { get; set; } - /// Canary (stack canaries) flag. - bool? FeatureCanary { get; set; } - /// NX (no-execute) flag. - bool? FeatureNx { get; set; } - /// PIE (position independent executable) flag. - bool? FeaturePie { get; set; } - /// RELRO (relocation read-only) flag. - bool? FeatureRelro { get; set; } - /// Stripped flag. - bool? FeatureStripped { get; set; } - /// The executable path. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("x86", "x64")] + string ExecutableClass { get; set; } + /// The path to the binary in the firmware. string FilePath { get; set; } - /// The rpath of the uploaded firmware. + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; set; } + /// + /// The rpath property of the uploaded binary, which is a deprecated method of specifying additional paths to load objects + /// at runtime. + /// string Rpath { get; set; } - /// The runpath of the uploaded firmware. + /// + /// The runpath property of the uploaded binary, which is a method of specifying additional paths to load objects at runtime. + /// string Runpath { get; set; } + /// The security hardening features of the binary. + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningFeatures SecurityHardeningFeature { get; set; } + /// Flag indicating if the binary was compiled with stack canaries enabled. + bool? SecurityHardeningFeatureCanary { get; set; } + /// Flag indicating the binary's stack is set to NX (no-execute). + bool? SecurityHardeningFeatureNoExecute { get; set; } + /// + /// Flag indicating the binary was compiled to be a position independent executable. + /// + bool? SecurityHardeningFeaturePositionIndependentExecutable { get; set; } + /// Flag indicating the binary has enabled relocation read-only protections. + bool? SecurityHardeningFeatureRelocationReadOnly { get; set; } + /// Flag indicating if debug symbols have been stripped from the binary. + bool? SecurityHardeningFeatureStripped { get; set; } } } \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResult.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResult.json.cs index 80fa441ed290..301900e47df6 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResult.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningResult.json.cs @@ -65,13 +65,14 @@ internal BinaryHardeningResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalys { return; } - {_feature = If( json?.PropertyT("features"), out var __jsonFeatures) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningFeatures.FromJson(__jsonFeatures) : _feature;} + {_securityHardeningFeature = If( json?.PropertyT("securityHardeningFeatures"), out var __jsonSecurityHardeningFeatures) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningFeatures.FromJson(__jsonSecurityHardeningFeatures) : _securityHardeningFeature;} {_binaryHardeningId = If( json?.PropertyT("binaryHardeningId"), out var __jsonBinaryHardeningId) ? (string)__jsonBinaryHardeningId : (string)_binaryHardeningId;} - {_architecture = If( json?.PropertyT("architecture"), out var __jsonArchitecture) ? (string)__jsonArchitecture : (string)_architecture;} + {_executableArchitecture = If( json?.PropertyT("executableArchitecture"), out var __jsonExecutableArchitecture) ? (string)__jsonExecutableArchitecture : (string)_executableArchitecture;} {_filePath = If( json?.PropertyT("filePath"), out var __jsonFilePath) ? (string)__jsonFilePath : (string)_filePath;} - {_class = If( json?.PropertyT("class"), out var __jsonClass) ? (string)__jsonClass : (string)_class;} + {_executableClass = If( json?.PropertyT("executableClass"), out var __jsonExecutableClass) ? (string)__jsonExecutableClass : (string)_executableClass;} {_runpath = If( json?.PropertyT("runpath"), out var __jsonRunpath) ? (string)__jsonRunpath : (string)_runpath;} {_rpath = If( json?.PropertyT("rpath"), out var __jsonRpath) ? (string)__jsonRpath : (string)_rpath;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} AfterFromJson(json); } @@ -106,13 +107,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - AddIf( null != this._feature ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._feature.ToJson(null,serializationMode) : null, "features" ,container.Add ); + AddIf( null != this._securityHardeningFeature ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._securityHardeningFeature.ToJson(null,serializationMode) : null, "securityHardeningFeatures" ,container.Add ); AddIf( null != (((object)this._binaryHardeningId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._binaryHardeningId.ToString()) : null, "binaryHardeningId" ,container.Add ); - AddIf( null != (((object)this._architecture)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._architecture.ToString()) : null, "architecture" ,container.Add ); + AddIf( null != (((object)this._executableArchitecture)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._executableArchitecture.ToString()) : null, "executableArchitecture" ,container.Add ); AddIf( null != (((object)this._filePath)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._filePath.ToString()) : null, "filePath" ,container.Add ); - AddIf( null != (((object)this._class)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._class.ToString()) : null, "class" ,container.Add ); + AddIf( null != (((object)this._executableClass)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._executableClass.ToString()) : null, "executableClass" ,container.Add ); AddIf( null != (((object)this._runpath)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._runpath.ToString()) : null, "runpath" ,container.Add ); AddIf( null != (((object)this._rpath)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._rpath.ToString()) : null, "rpath" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningSummaryResource.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningSummaryResource.PowerShell.cs index 55ce0ab158cb..b70a0c92f8e4 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningSummaryResource.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningSummaryResource.PowerShell.cs @@ -80,30 +80,34 @@ internal BinaryHardeningSummaryResource(global::System.Collections.IDictionary c { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).TotalFile = (long?) content.GetValueForProperty("TotalFile",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).TotalFile, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("Nx")) + if (content.Contains("NotExecutableStackCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Nx = (int?) content.GetValueForProperty("Nx",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Nx, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).NotExecutableStackCount = (long?) content.GetValueForProperty("NotExecutableStackCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).NotExecutableStackCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("Pie")) + if (content.Contains("PositionIndependentExecutableCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Pie = (int?) content.GetValueForProperty("Pie",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Pie, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).PositionIndependentExecutableCount = (long?) content.GetValueForProperty("PositionIndependentExecutableCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).PositionIndependentExecutableCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("Relro")) + if (content.Contains("RelocationReadOnlyCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Relro = (int?) content.GetValueForProperty("Relro",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Relro, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).RelocationReadOnlyCount = (long?) content.GetValueForProperty("RelocationReadOnlyCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).RelocationReadOnlyCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("Canary")) + if (content.Contains("StackCanaryCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Canary = (int?) content.GetValueForProperty("Canary",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Canary, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).StackCanaryCount = (long?) content.GetValueForProperty("StackCanaryCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).StackCanaryCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("Stripped")) + if (content.Contains("StrippedBinaryCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Stripped = (int?) content.GetValueForProperty("Stripped",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Stripped, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).StrippedBinaryCount = (long?) content.GetValueForProperty("StrippedBinaryCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).StrippedBinaryCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SummaryType")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType = (string) content.GetValueForProperty("SummaryType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -125,30 +129,34 @@ internal BinaryHardeningSummaryResource(global::System.Management.Automation.PSO { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).TotalFile = (long?) content.GetValueForProperty("TotalFile",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).TotalFile, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("Nx")) + if (content.Contains("NotExecutableStackCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Nx = (int?) content.GetValueForProperty("Nx",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Nx, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).NotExecutableStackCount = (long?) content.GetValueForProperty("NotExecutableStackCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).NotExecutableStackCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("Pie")) + if (content.Contains("PositionIndependentExecutableCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Pie = (int?) content.GetValueForProperty("Pie",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Pie, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).PositionIndependentExecutableCount = (long?) content.GetValueForProperty("PositionIndependentExecutableCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).PositionIndependentExecutableCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("Relro")) + if (content.Contains("RelocationReadOnlyCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Relro = (int?) content.GetValueForProperty("Relro",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Relro, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).RelocationReadOnlyCount = (long?) content.GetValueForProperty("RelocationReadOnlyCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).RelocationReadOnlyCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("Canary")) + if (content.Contains("StackCanaryCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Canary = (int?) content.GetValueForProperty("Canary",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Canary, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).StackCanaryCount = (long?) content.GetValueForProperty("StackCanaryCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).StackCanaryCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("Stripped")) + if (content.Contains("StrippedBinaryCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Stripped = (int?) content.GetValueForProperty("Stripped",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).Stripped, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).StrippedBinaryCount = (long?) content.GetValueForProperty("StrippedBinaryCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningSummaryResourceInternal)this).StrippedBinaryCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SummaryType")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType = (string) content.GetValueForProperty("SummaryType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningSummaryResource.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningSummaryResource.cs index 529ad6d86e85..ea5699ea3c08 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningSummaryResource.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningSummaryResource.cs @@ -19,42 +19,53 @@ public partial class BinaryHardeningSummaryResource : /// private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceProperties __summaryResourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceProperties(); - /// Backing field for property. - private int? _canary; + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).ProvisioningState = value ?? null; } - /// Canary summary percentage + /// Backing field for property. + private long? _notExecutableStackCount; + + /// Total number of analyzed files that were found to have a nonexecutable stack [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public int? Canary { get => this._canary; set => this._canary = value; } + public long? NotExecutableStackCount { get => this._notExecutableStackCount; set => this._notExecutableStackCount = value; } - /// Backing field for property. - private int? _nx; + /// Backing field for property. + private long? _positionIndependentExecutableCount; - /// NX summary percentage + /// + /// Total number of analyzed files that were compiled to be a position independent executable + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public int? Nx { get => this._nx; set => this._nx = value; } + public long? PositionIndependentExecutableCount { get => this._positionIndependentExecutableCount; set => this._positionIndependentExecutableCount = value; } + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).ProvisioningState; } - /// Backing field for property. - private int? _pie; + /// Backing field for property. + private long? _relocationReadOnlyCount; - /// PIE summary percentage + /// + /// Total number of analyzed files that have enabled relocation read-only protections + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public int? Pie { get => this._pie; set => this._pie = value; } + public long? RelocationReadOnlyCount { get => this._relocationReadOnlyCount; set => this._relocationReadOnlyCount = value; } - /// Backing field for property. - private int? _relro; + /// Backing field for property. + private long? _stackCanaryCount; - /// RELRO summary percentage + /// Total number of analyzed files that have stack canaries enabled [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public int? Relro { get => this._relro; set => this._relro = value; } + public long? StackCanaryCount { get => this._stackCanaryCount; set => this._stackCanaryCount = value; } - /// Backing field for property. - private int? _stripped; + /// Backing field for property. + private long? _strippedBinaryCount; - /// Stripped summary percentage + /// Total number of analyzed files that have debug symbols stripped [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public int? Stripped { get => this._stripped; set => this._stripped = value; } + public long? StrippedBinaryCount { get => this._strippedBinaryCount; set => this._strippedBinaryCount = value; } - /// Describes the type of summary. + /// The type of summary. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Constant] [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] public string SummaryType { get => "BinaryHardening"; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).SummaryType = "BinaryHardening"; } @@ -89,61 +100,65 @@ public partial interface IBinaryHardeningSummaryResource : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceProperties { - /// Canary summary percentage + /// Total number of analyzed files that were found to have a nonexecutable stack [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Canary summary percentage", - SerializedName = @"canary", - PossibleTypes = new [] { typeof(int) })] - int? Canary { get; set; } - /// NX summary percentage + Description = @"Total number of analyzed files that were found to have a nonexecutable stack", + SerializedName = @"notExecutableStackCount", + PossibleTypes = new [] { typeof(long) })] + long? NotExecutableStackCount { get; set; } + /// + /// Total number of analyzed files that were compiled to be a position independent executable + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"NX summary percentage", - SerializedName = @"nx", - PossibleTypes = new [] { typeof(int) })] - int? Nx { get; set; } - /// PIE summary percentage + Description = @"Total number of analyzed files that were compiled to be a position independent executable", + SerializedName = @"positionIndependentExecutableCount", + PossibleTypes = new [] { typeof(long) })] + long? PositionIndependentExecutableCount { get; set; } + /// + /// Total number of analyzed files that have enabled relocation read-only protections + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"PIE summary percentage", - SerializedName = @"pie", - PossibleTypes = new [] { typeof(int) })] - int? Pie { get; set; } - /// RELRO summary percentage + Description = @"Total number of analyzed files that have enabled relocation read-only protections", + SerializedName = @"relocationReadOnlyCount", + PossibleTypes = new [] { typeof(long) })] + long? RelocationReadOnlyCount { get; set; } + /// Total number of analyzed files that have stack canaries enabled [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"RELRO summary percentage", - SerializedName = @"relro", - PossibleTypes = new [] { typeof(int) })] - int? Relro { get; set; } - /// Stripped summary percentage + Description = @"Total number of analyzed files that have stack canaries enabled", + SerializedName = @"stackCanaryCount", + PossibleTypes = new [] { typeof(long) })] + long? StackCanaryCount { get; set; } + /// Total number of analyzed files that have debug symbols stripped [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Stripped summary percentage", - SerializedName = @"stripped", - PossibleTypes = new [] { typeof(int) })] - int? Stripped { get; set; } + Description = @"Total number of analyzed files that have debug symbols stripped", + SerializedName = @"strippedBinaryCount", + PossibleTypes = new [] { typeof(long) })] + long? StrippedBinaryCount { get; set; } /// Total number of binaries that were analyzed [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -161,16 +176,20 @@ public partial interface IBinaryHardeningSummaryResource : internal partial interface IBinaryHardeningSummaryResourceInternal : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal { - /// Canary summary percentage - int? Canary { get; set; } - /// NX summary percentage - int? Nx { get; set; } - /// PIE summary percentage - int? Pie { get; set; } - /// RELRO summary percentage - int? Relro { get; set; } - /// Stripped summary percentage - int? Stripped { get; set; } + /// Total number of analyzed files that were found to have a nonexecutable stack + long? NotExecutableStackCount { get; set; } + /// + /// Total number of analyzed files that were compiled to be a position independent executable + /// + long? PositionIndependentExecutableCount { get; set; } + /// + /// Total number of analyzed files that have enabled relocation read-only protections + /// + long? RelocationReadOnlyCount { get; set; } + /// Total number of analyzed files that have stack canaries enabled + long? StackCanaryCount { get; set; } + /// Total number of analyzed files that have debug symbols stripped + long? StrippedBinaryCount { get; set; } /// Total number of binaries that were analyzed long? TotalFile { get; set; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningSummaryResource.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningSummaryResource.json.cs index 88667df47da8..443fc4901de4 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningSummaryResource.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningSummaryResource.json.cs @@ -67,11 +67,11 @@ internal BinaryHardeningSummaryResource(Microsoft.Azure.PowerShell.Cmdlets.Firmw } __summaryResourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceProperties(json); {_totalFile = If( json?.PropertyT("totalFiles"), out var __jsonTotalFiles) ? (long?)__jsonTotalFiles : _totalFile;} - {_nx = If( json?.PropertyT("nx"), out var __jsonNx) ? (int?)__jsonNx : _nx;} - {_pie = If( json?.PropertyT("pie"), out var __jsonPie) ? (int?)__jsonPie : _pie;} - {_relro = If( json?.PropertyT("relro"), out var __jsonRelro) ? (int?)__jsonRelro : _relro;} - {_canary = If( json?.PropertyT("canary"), out var __jsonCanary) ? (int?)__jsonCanary : _canary;} - {_stripped = If( json?.PropertyT("stripped"), out var __jsonStripped) ? (int?)__jsonStripped : _stripped;} + {_notExecutableStackCount = If( json?.PropertyT("notExecutableStackCount"), out var __jsonNotExecutableStackCount) ? (long?)__jsonNotExecutableStackCount : _notExecutableStackCount;} + {_positionIndependentExecutableCount = If( json?.PropertyT("positionIndependentExecutableCount"), out var __jsonPositionIndependentExecutableCount) ? (long?)__jsonPositionIndependentExecutableCount : _positionIndependentExecutableCount;} + {_relocationReadOnlyCount = If( json?.PropertyT("relocationReadOnlyCount"), out var __jsonRelocationReadOnlyCount) ? (long?)__jsonRelocationReadOnlyCount : _relocationReadOnlyCount;} + {_stackCanaryCount = If( json?.PropertyT("stackCanaryCount"), out var __jsonStackCanaryCount) ? (long?)__jsonStackCanaryCount : _stackCanaryCount;} + {_strippedBinaryCount = If( json?.PropertyT("strippedBinaryCount"), out var __jsonStrippedBinaryCount) ? (long?)__jsonStrippedBinaryCount : _strippedBinaryCount;} AfterFromJson(json); } @@ -108,11 +108,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode } __summaryResourceProperties?.ToJson(container, serializationMode); AddIf( null != this._totalFile ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._totalFile) : null, "totalFiles" ,container.Add ); - AddIf( null != this._nx ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((int)this._nx) : null, "nx" ,container.Add ); - AddIf( null != this._pie ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((int)this._pie) : null, "pie" ,container.Add ); - AddIf( null != this._relro ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((int)this._relro) : null, "relro" ,container.Add ); - AddIf( null != this._canary ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((int)this._canary) : null, "canary" ,container.Add ); - AddIf( null != this._stripped ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((int)this._stripped) : null, "stripped" ,container.Add ); + AddIf( null != this._notExecutableStackCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._notExecutableStackCount) : null, "notExecutableStackCount" ,container.Add ); + AddIf( null != this._positionIndependentExecutableCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._positionIndependentExecutableCount) : null, "positionIndependentExecutableCount" ,container.Add ); + AddIf( null != this._relocationReadOnlyCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._relocationReadOnlyCount) : null, "relocationReadOnlyCount" ,container.Add ); + AddIf( null != this._stackCanaryCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._stackCanaryCount) : null, "stackCanaryCount" ,container.Add ); + AddIf( null != this._strippedBinaryCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._strippedBinaryCount) : null, "strippedBinaryCount" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificate.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificate.PowerShell.cs index 9e33d715ff24..b245edc44206 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificate.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificate.PowerShell.cs @@ -92,9 +92,9 @@ internal CryptoCertificate(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CryptoCertId = (string) content.GetValueForProperty("CryptoCertId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CryptoCertId, global::System.Convert.ToString); } - if (content.Contains("Name")) + if (content.Contains("CertificateName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateName = (string) content.GetValueForProperty("CertificateName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateName, global::System.Convert.ToString); } if (content.Contains("IssuedDate")) { @@ -104,21 +104,21 @@ internal CryptoCertificate(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).ExpirationDate = (global::System.DateTime?) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).ExpirationDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } - if (content.Contains("Role")) + if (content.Contains("CertificateRole")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).Role, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateRole = (string) content.GetValueForProperty("CertificateRole",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateRole, global::System.Convert.ToString); } if (content.Contains("SignatureAlgorithm")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).SignatureAlgorithm = (string) content.GetValueForProperty("SignatureAlgorithm",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).SignatureAlgorithm, global::System.Convert.ToString); } - if (content.Contains("KeySize")) + if (content.Contains("CertificateKeySize")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).KeySize = (long?) content.GetValueForProperty("KeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).KeySize, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateKeySize = (long?) content.GetValueForProperty("CertificateKeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateKeySize, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("KeyAlgorithm")) + if (content.Contains("CertificateKeyAlgorithm")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).KeyAlgorithm = (string) content.GetValueForProperty("KeyAlgorithm",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).KeyAlgorithm, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateKeyAlgorithm = (string) content.GetValueForProperty("CertificateKeyAlgorithm",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateKeyAlgorithm, global::System.Convert.ToString); } if (content.Contains("Encoding")) { @@ -132,9 +132,9 @@ internal CryptoCertificate(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).Fingerprint = (string) content.GetValueForProperty("Fingerprint",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).Fingerprint, global::System.Convert.ToString); } - if (content.Contains("Usage")) + if (content.Contains("CertificateUsage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).Usage = (System.Collections.Generic.List) content.GetValueForProperty("Usage",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).Usage, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateUsage = (System.Collections.Generic.List) content.GetValueForProperty("CertificateUsage",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateUsage, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("FilePath")) { @@ -156,9 +156,9 @@ internal CryptoCertificate(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).IsShortKeySize = (bool?) content.GetValueForProperty("IsShortKeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).IsShortKeySize, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("PairedKeyId")) + if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).PairedKeyId = (string) content.GetValueForProperty("PairedKeyId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).PairedKeyId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PairedKeyType")) { @@ -204,6 +204,10 @@ internal CryptoCertificate(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).IssuerCountry = (string) content.GetValueForProperty("IssuerCountry",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).IssuerCountry, global::System.Convert.ToString); } + if (content.Contains("PairedKeyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).PairedKeyId = (string) content.GetValueForProperty("PairedKeyId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).PairedKeyId, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -237,9 +241,9 @@ internal CryptoCertificate(global::System.Management.Automation.PSObject content { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CryptoCertId = (string) content.GetValueForProperty("CryptoCertId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CryptoCertId, global::System.Convert.ToString); } - if (content.Contains("Name")) + if (content.Contains("CertificateName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateName = (string) content.GetValueForProperty("CertificateName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateName, global::System.Convert.ToString); } if (content.Contains("IssuedDate")) { @@ -249,21 +253,21 @@ internal CryptoCertificate(global::System.Management.Automation.PSObject content { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).ExpirationDate = (global::System.DateTime?) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).ExpirationDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } - if (content.Contains("Role")) + if (content.Contains("CertificateRole")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).Role, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateRole = (string) content.GetValueForProperty("CertificateRole",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateRole, global::System.Convert.ToString); } if (content.Contains("SignatureAlgorithm")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).SignatureAlgorithm = (string) content.GetValueForProperty("SignatureAlgorithm",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).SignatureAlgorithm, global::System.Convert.ToString); } - if (content.Contains("KeySize")) + if (content.Contains("CertificateKeySize")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).KeySize = (long?) content.GetValueForProperty("KeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).KeySize, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateKeySize = (long?) content.GetValueForProperty("CertificateKeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateKeySize, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("KeyAlgorithm")) + if (content.Contains("CertificateKeyAlgorithm")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).KeyAlgorithm = (string) content.GetValueForProperty("KeyAlgorithm",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).KeyAlgorithm, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateKeyAlgorithm = (string) content.GetValueForProperty("CertificateKeyAlgorithm",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateKeyAlgorithm, global::System.Convert.ToString); } if (content.Contains("Encoding")) { @@ -277,9 +281,9 @@ internal CryptoCertificate(global::System.Management.Automation.PSObject content { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).Fingerprint = (string) content.GetValueForProperty("Fingerprint",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).Fingerprint, global::System.Convert.ToString); } - if (content.Contains("Usage")) + if (content.Contains("CertificateUsage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).Usage = (System.Collections.Generic.List) content.GetValueForProperty("Usage",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).Usage, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateUsage = (System.Collections.Generic.List) content.GetValueForProperty("CertificateUsage",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).CertificateUsage, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("FilePath")) { @@ -301,9 +305,9 @@ internal CryptoCertificate(global::System.Management.Automation.PSObject content { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).IsShortKeySize = (bool?) content.GetValueForProperty("IsShortKeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).IsShortKeySize, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("PairedKeyId")) + if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).PairedKeyId = (string) content.GetValueForProperty("PairedKeyId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).PairedKeyId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PairedKeyType")) { @@ -349,6 +353,10 @@ internal CryptoCertificate(global::System.Management.Automation.PSObject content { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).IssuerCountry = (string) content.GetValueForProperty("IssuerCountry",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).IssuerCountry, global::System.Convert.ToString); } + if (content.Contains("PairedKeyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).PairedKeyId = (string) content.GetValueForProperty("PairedKeyId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)this).PairedKeyId, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificate.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificate.cs index 2421048975c5..9f5c5fbb6933 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificate.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificate.cs @@ -13,6 +13,41 @@ public partial class CryptoCertificate : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal { + /// Backing field for property. + private string _certificateKeyAlgorithm; + + /// Key algorithm used in the certificate. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string CertificateKeyAlgorithm { get => this._certificateKeyAlgorithm; set => this._certificateKeyAlgorithm = value; } + + /// Backing field for property. + private long? _certificateKeySize; + + /// Size of the certificate's key in bits + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public long? CertificateKeySize { get => this._certificateKeySize; set => this._certificateKeySize = value; } + + /// Backing field for property. + private string _certificateName; + + /// Name of the certificate. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string CertificateName { get => this._certificateName; set => this._certificateName = value; } + + /// Backing field for property. + private string _certificateRole; + + /// Role of the certificate (Root CA, etc) + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string CertificateRole { get => this._certificateRole; set => this._certificateRole = value; } + + /// Backing field for property. + private System.Collections.Generic.List _certificateUsage; + + /// List of functions the certificate can fulfill. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public System.Collections.Generic.List CertificateUsage { get => this._certificateUsage; set => this._certificateUsage = value; } + /// Backing field for property. private string _cryptoCertId; @@ -66,7 +101,7 @@ public partial class CryptoCertificate : private bool? _isShortKeySize; /// - /// Indicates the certificate's key size is considered too small to be secure for the key algorithm. + /// Indicates the certificate's key size is considered too small to be secure for the key algorithm according to NIST guidance. /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public bool? IsShortKeySize { get => this._isShortKeySize; set => this._isShortKeySize = value; } @@ -74,7 +109,7 @@ public partial class CryptoCertificate : /// Backing field for property. private bool? _isWeakSignature; - /// Indicates the signature algorithm used is insecure. + /// Indicates the signature algorithm used is insecure according to NIST guidance. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public bool? IsWeakSignature { get => this._isWeakSignature; set => this._isWeakSignature = value; } @@ -112,20 +147,6 @@ public partial class CryptoCertificate : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string IssuerState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateEntityInternal)Issuer).State; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateEntityInternal)Issuer).State = value ?? null; } - /// Backing field for property. - private string _keyAlgorithm; - - /// Key algorithm used in the certificate. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public string KeyAlgorithm { get => this._keyAlgorithm; set => this._keyAlgorithm = value; } - - /// Backing field for property. - private long? _keySize; - - /// Size of the certificate's key in bits - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public long? KeySize { get => this._keySize; set => this._keySize = value; } - /// Internal Acessors for FilePath System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal.FilePath { get => this._filePath; set { {_filePath = value;} } } @@ -135,16 +156,12 @@ public partial class CryptoCertificate : /// Internal Acessors for PairedKey Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKey Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal.PairedKey { get => (this._pairedKey = this._pairedKey ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PairedKey()); set { {_pairedKey = value;} } } + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + /// Internal Acessors for Subject Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateEntity Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal.Subject { get => (this._subject = this._subject ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificateEntity()); set { {_subject = value;} } } - /// Backing field for property. - private string _name; - - /// Name of the certificate. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public string Name { get => this._name; set => this._name = value; } - /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKey _pairedKey; @@ -160,12 +177,12 @@ public partial class CryptoCertificate : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string PairedKeyType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKeyInternal)PairedKey).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKeyInternal)PairedKey).Type = value ?? null; } - /// Backing field for property. - private string _role; + /// Backing field for property. + private string _provisioningState; - /// Role of the certificate (Root CA, etc) + /// The status of the last operation. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public string Role { get => this._role; set => this._role = value; } + public string ProvisioningState { get => this._provisioningState; } /// Backing field for property. private string _serialNumber; @@ -208,13 +225,6 @@ public partial class CryptoCertificate : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string SubjectState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateEntityInternal)Subject).State; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateEntityInternal)Subject).State = value ?? null; } - /// Backing field for property. - private System.Collections.Generic.List _usage; - - /// List of functions the certificate can fulfill. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public System.Collections.Generic.List Usage { get => this._usage; set => this._usage = value; } - /// Creates an new instance. public CryptoCertificate() { @@ -225,6 +235,62 @@ public CryptoCertificate() public partial interface ICryptoCertificate : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable { + /// Key algorithm used in the certificate. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Key algorithm used in the certificate.", + SerializedName = @"certificateKeyAlgorithm", + PossibleTypes = new [] { typeof(string) })] + string CertificateKeyAlgorithm { get; set; } + /// Size of the certificate's key in bits + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Size of the certificate's key in bits", + SerializedName = @"certificateKeySize", + PossibleTypes = new [] { typeof(long) })] + long? CertificateKeySize { get; set; } + /// Name of the certificate. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of the certificate.", + SerializedName = @"certificateName", + PossibleTypes = new [] { typeof(string) })] + string CertificateName { get; set; } + /// Role of the certificate (Root CA, etc) + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Role of the certificate (Root CA, etc)", + SerializedName = @"certificateRole", + PossibleTypes = new [] { typeof(string) })] + string CertificateRole { get; set; } + /// List of functions the certificate can fulfill. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"List of functions the certificate can fulfill.", + SerializedName = @"certificateUsage", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("digitalSignature", "nonRepudiation", "contentCommitment", "keyEncipherment", "dataEncipherment", "keyAgreement", "keyCertSign", "crlSign", "encipherOnly", "decipherOnly", "serverAuth", "clientAuth", "codeSigning", "emailProtection", "timeStamping", "ocspSigning")] + System.Collections.Generic.List CertificateUsage { get; set; } /// ID for the certificate result. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -303,7 +369,7 @@ public partial interface ICryptoCertificate : PossibleTypes = new [] { typeof(bool) })] bool? IsSelfSigned { get; set; } /// - /// Indicates the certificate's key size is considered too small to be secure for the key algorithm. + /// Indicates the certificate's key size is considered too small to be secure for the key algorithm according to NIST guidance. /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -311,18 +377,18 @@ public partial interface ICryptoCertificate : Read = true, Create = true, Update = true, - Description = @"Indicates the certificate's key size is considered too small to be secure for the key algorithm.", + Description = @"Indicates the certificate's key size is considered too small to be secure for the key algorithm according to NIST guidance.", SerializedName = @"isShortKeySize", PossibleTypes = new [] { typeof(bool) })] bool? IsShortKeySize { get; set; } - /// Indicates the signature algorithm used is insecure. + /// Indicates the signature algorithm used is insecure according to NIST guidance. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Indicates the signature algorithm used is insecure.", + Description = @"Indicates the signature algorithm used is insecure according to NIST guidance.", SerializedName = @"isWeakSignature", PossibleTypes = new [] { typeof(bool) })] bool? IsWeakSignature { get; set; } @@ -392,39 +458,6 @@ public partial interface ICryptoCertificate : SerializedName = @"state", PossibleTypes = new [] { typeof(string) })] string IssuerState { get; set; } - /// Key algorithm used in the certificate. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"Key algorithm used in the certificate.", - SerializedName = @"keyAlgorithm", - PossibleTypes = new [] { typeof(string) })] - string KeyAlgorithm { get; set; } - /// Size of the certificate's key in bits - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"Size of the certificate's key in bits", - SerializedName = @"keySize", - PossibleTypes = new [] { typeof(long) })] - long? KeySize { get; set; } - /// Name of the certificate. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"Name of the certificate.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; set; } /// ID of the paired key or certificate. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -433,7 +466,7 @@ public partial interface ICryptoCertificate : Create = true, Update = true, Description = @"ID of the paired key or certificate.", - SerializedName = @"id", + SerializedName = @"pairedKeyId", PossibleTypes = new [] { typeof(string) })] string PairedKeyId { get; set; } /// The type indicating whether the paired object is a key or certificate. @@ -447,17 +480,18 @@ public partial interface ICryptoCertificate : SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] string PairedKeyType { get; set; } - /// Role of the certificate (Root CA, etc) + /// The status of the last operation. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Read = true, - Create = true, - Update = true, - Description = @"Role of the certificate (Root CA, etc)", - SerializedName = @"role", + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(string) })] - string Role { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; } /// Serial number of the certificate. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -535,23 +569,23 @@ public partial interface ICryptoCertificate : SerializedName = @"state", PossibleTypes = new [] { typeof(string) })] string SubjectState { get; set; } - /// List of functions the certificate can fulfill. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"List of functions the certificate can fulfill.", - SerializedName = @"usage", - PossibleTypes = new [] { typeof(string) })] - System.Collections.Generic.List Usage { get; set; } } /// Crypto certificate properties internal partial interface ICryptoCertificateInternal { + /// Key algorithm used in the certificate. + string CertificateKeyAlgorithm { get; set; } + /// Size of the certificate's key in bits + long? CertificateKeySize { get; set; } + /// Name of the certificate. + string CertificateName { get; set; } + /// Role of the certificate (Root CA, etc) + string CertificateRole { get; set; } + /// List of functions the certificate can fulfill. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("digitalSignature", "nonRepudiation", "contentCommitment", "keyEncipherment", "dataEncipherment", "keyAgreement", "keyCertSign", "crlSign", "encipherOnly", "decipherOnly", "serverAuth", "clientAuth", "codeSigning", "emailProtection", "timeStamping", "ocspSigning")] + System.Collections.Generic.List CertificateUsage { get; set; } /// ID for the certificate result. string CryptoCertId { get; set; } /// Encoding used for the certificate. @@ -567,10 +601,10 @@ internal partial interface ICryptoCertificateInternal /// Indicates if the certificate is self-signed. bool? IsSelfSigned { get; set; } /// - /// Indicates the certificate's key size is considered too small to be secure for the key algorithm. + /// Indicates the certificate's key size is considered too small to be secure for the key algorithm according to NIST guidance. /// bool? IsShortKeySize { get; set; } - /// Indicates the signature algorithm used is insecure. + /// Indicates the signature algorithm used is insecure according to NIST guidance. bool? IsWeakSignature { get; set; } /// Issue date for the certificate. global::System.DateTime? IssuedDate { get; set; } @@ -586,20 +620,15 @@ internal partial interface ICryptoCertificateInternal string IssuerOrganizationalUnit { get; set; } /// Geographical state or province of the certificate entity. string IssuerState { get; set; } - /// Key algorithm used in the certificate. - string KeyAlgorithm { get; set; } - /// Size of the certificate's key in bits - long? KeySize { get; set; } - /// Name of the certificate. - string Name { get; set; } /// A matching paired private key. Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKey PairedKey { get; set; } /// ID of the paired key or certificate. string PairedKeyId { get; set; } /// The type indicating whether the paired object is a key or certificate. string PairedKeyType { get; set; } - /// Role of the certificate (Root CA, etc) - string Role { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; set; } /// Serial number of the certificate. string SerialNumber { get; set; } /// The signature algorithm used in the certificate. @@ -616,8 +645,6 @@ internal partial interface ICryptoCertificateInternal string SubjectOrganizationalUnit { get; set; } /// Geographical state or province of the certificate entity. string SubjectState { get; set; } - /// List of functions the certificate can fulfill. - System.Collections.Generic.List Usage { get; set; } } } \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificate.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificate.json.cs index 719c1461c9ee..1d00a5ae84a0 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificate.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificate.json.cs @@ -69,22 +69,23 @@ internal CryptoCertificate(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.R {_issuer = If( json?.PropertyT("issuer"), out var __jsonIssuer) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificateEntity.FromJson(__jsonIssuer) : _issuer;} {_pairedKey = If( json?.PropertyT("pairedKey"), out var __jsonPairedKey) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PairedKey.FromJson(__jsonPairedKey) : _pairedKey;} {_cryptoCertId = If( json?.PropertyT("cryptoCertId"), out var __jsonCryptoCertId) ? (string)__jsonCryptoCertId : (string)_cryptoCertId;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_certificateName = If( json?.PropertyT("certificateName"), out var __jsonCertificateName) ? (string)__jsonCertificateName : (string)_certificateName;} {_issuedDate = If( json?.PropertyT("issuedDate"), out var __jsonIssuedDate) ? global::System.DateTime.TryParse((string)__jsonIssuedDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonIssuedDateValue) ? __jsonIssuedDateValue : _issuedDate : _issuedDate;} {_expirationDate = If( json?.PropertyT("expirationDate"), out var __jsonExpirationDate) ? global::System.DateTime.TryParse((string)__jsonExpirationDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonExpirationDateValue) ? __jsonExpirationDateValue : _expirationDate : _expirationDate;} - {_role = If( json?.PropertyT("role"), out var __jsonRole) ? (string)__jsonRole : (string)_role;} + {_certificateRole = If( json?.PropertyT("certificateRole"), out var __jsonCertificateRole) ? (string)__jsonCertificateRole : (string)_certificateRole;} {_signatureAlgorithm = If( json?.PropertyT("signatureAlgorithm"), out var __jsonSignatureAlgorithm) ? (string)__jsonSignatureAlgorithm : (string)_signatureAlgorithm;} - {_keySize = If( json?.PropertyT("keySize"), out var __jsonKeySize) ? (long?)__jsonKeySize : _keySize;} - {_keyAlgorithm = If( json?.PropertyT("keyAlgorithm"), out var __jsonKeyAlgorithm) ? (string)__jsonKeyAlgorithm : (string)_keyAlgorithm;} + {_certificateKeySize = If( json?.PropertyT("certificateKeySize"), out var __jsonCertificateKeySize) ? (long?)__jsonCertificateKeySize : _certificateKeySize;} + {_certificateKeyAlgorithm = If( json?.PropertyT("certificateKeyAlgorithm"), out var __jsonCertificateKeyAlgorithm) ? (string)__jsonCertificateKeyAlgorithm : (string)_certificateKeyAlgorithm;} {_encoding = If( json?.PropertyT("encoding"), out var __jsonEncoding) ? (string)__jsonEncoding : (string)_encoding;} {_serialNumber = If( json?.PropertyT("serialNumber"), out var __jsonSerialNumber) ? (string)__jsonSerialNumber : (string)_serialNumber;} {_fingerprint = If( json?.PropertyT("fingerprint"), out var __jsonFingerprint) ? (string)__jsonFingerprint : (string)_fingerprint;} - {_usage = If( json?.PropertyT("usage"), out var __jsonUsage) ? If( __jsonUsage as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _usage;} + {_certificateUsage = If( json?.PropertyT("certificateUsage"), out var __jsonCertificateUsage) ? If( __jsonCertificateUsage as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _certificateUsage;} {_filePath = If( json?.PropertyT("filePaths"), out var __jsonFilePaths) ? If( __jsonFilePaths as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : _filePath;} {_isExpired = If( json?.PropertyT("isExpired"), out var __jsonIsExpired) ? (bool?)__jsonIsExpired : _isExpired;} {_isSelfSigned = If( json?.PropertyT("isSelfSigned"), out var __jsonIsSelfSigned) ? (bool?)__jsonIsSelfSigned : _isSelfSigned;} {_isWeakSignature = If( json?.PropertyT("isWeakSignature"), out var __jsonIsWeakSignature) ? (bool?)__jsonIsWeakSignature : _isWeakSignature;} {_isShortKeySize = If( json?.PropertyT("isShortKeySize"), out var __jsonIsShortKeySize) ? (bool?)__jsonIsShortKeySize : _isShortKeySize;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} AfterFromJson(json); } @@ -123,24 +124,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode AddIf( null != this._issuer ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._issuer.ToJson(null,serializationMode) : null, "issuer" ,container.Add ); AddIf( null != this._pairedKey ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._pairedKey.ToJson(null,serializationMode) : null, "pairedKey" ,container.Add ); AddIf( null != (((object)this._cryptoCertId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._cryptoCertId.ToString()) : null, "cryptoCertId" ,container.Add ); - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._certificateName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._certificateName.ToString()) : null, "certificateName" ,container.Add ); AddIf( null != this._issuedDate ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._issuedDate?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "issuedDate" ,container.Add ); AddIf( null != this._expirationDate ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._expirationDate?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "expirationDate" ,container.Add ); - AddIf( null != (((object)this._role)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._role.ToString()) : null, "role" ,container.Add ); + AddIf( null != (((object)this._certificateRole)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._certificateRole.ToString()) : null, "certificateRole" ,container.Add ); AddIf( null != (((object)this._signatureAlgorithm)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._signatureAlgorithm.ToString()) : null, "signatureAlgorithm" ,container.Add ); - AddIf( null != this._keySize ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._keySize) : null, "keySize" ,container.Add ); - AddIf( null != (((object)this._keyAlgorithm)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._keyAlgorithm.ToString()) : null, "keyAlgorithm" ,container.Add ); + AddIf( null != this._certificateKeySize ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._certificateKeySize) : null, "certificateKeySize" ,container.Add ); + AddIf( null != (((object)this._certificateKeyAlgorithm)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._certificateKeyAlgorithm.ToString()) : null, "certificateKeyAlgorithm" ,container.Add ); AddIf( null != (((object)this._encoding)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._encoding.ToString()) : null, "encoding" ,container.Add ); AddIf( null != (((object)this._serialNumber)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._serialNumber.ToString()) : null, "serialNumber" ,container.Add ); AddIf( null != (((object)this._fingerprint)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._fingerprint.ToString()) : null, "fingerprint" ,container.Add ); - if (null != this._usage) + if (null != this._certificateUsage) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); - foreach( var __x in this._usage ) + foreach( var __x in this._certificateUsage ) { AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); } - container.Add("usage",__w); + container.Add("certificateUsage",__w); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) { @@ -158,6 +159,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode AddIf( null != this._isSelfSigned ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonBoolean((bool)this._isSelfSigned) : null, "isSelfSigned" ,container.Add ); AddIf( null != this._isWeakSignature ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonBoolean((bool)this._isWeakSignature) : null, "isWeakSignature" ,container.Add ); AddIf( null != this._isShortKeySize ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonBoolean((bool)this._isShortKeySize) : null, "isShortKeySize" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResource.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResource.PowerShell.cs index 5df05c87d6d6..d7338f66a2e4 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResource.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResource.PowerShell.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; - /// Crypto certificate resource + /// The object representing a firmware analysis crypto certificate resource [System.ComponentModel.TypeConverter(typeof(CryptoCertificateResourceTypeConverter))] public partial class CryptoCertificateResource { @@ -124,6 +124,10 @@ internal CryptoCertificateResource(global::System.Collections.IDictionary conten { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PairedKey = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKey) content.GetValueForProperty("PairedKey",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PairedKey, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PairedKeyTypeConverter.ConvertFrom); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } if (content.Contains("Subject")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).Subject = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateEntity) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).Subject, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificateEntityTypeConverter.ConvertFrom); @@ -136,9 +140,9 @@ internal CryptoCertificateResource(global::System.Collections.IDictionary conten { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CryptoCertId = (string) content.GetValueForProperty("CryptoCertId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CryptoCertId, global::System.Convert.ToString); } - if (content.Contains("PropertiesName")) + if (content.Contains("CertificateName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PropertiesName = (string) content.GetValueForProperty("PropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PropertiesName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateName = (string) content.GetValueForProperty("CertificateName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateName, global::System.Convert.ToString); } if (content.Contains("IssuedDate")) { @@ -148,21 +152,21 @@ internal CryptoCertificateResource(global::System.Collections.IDictionary conten { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).ExpirationDate = (global::System.DateTime?) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).ExpirationDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } - if (content.Contains("Role")) + if (content.Contains("CertificateRole")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).Role, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateRole = (string) content.GetValueForProperty("CertificateRole",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateRole, global::System.Convert.ToString); } if (content.Contains("SignatureAlgorithm")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).SignatureAlgorithm = (string) content.GetValueForProperty("SignatureAlgorithm",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).SignatureAlgorithm, global::System.Convert.ToString); } - if (content.Contains("KeySize")) + if (content.Contains("CertificateKeySize")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).KeySize = (long?) content.GetValueForProperty("KeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).KeySize, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateKeySize = (long?) content.GetValueForProperty("CertificateKeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateKeySize, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("KeyAlgorithm")) + if (content.Contains("CertificateKeyAlgorithm")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).KeyAlgorithm = (string) content.GetValueForProperty("KeyAlgorithm",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).KeyAlgorithm, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateKeyAlgorithm = (string) content.GetValueForProperty("CertificateKeyAlgorithm",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateKeyAlgorithm, global::System.Convert.ToString); } if (content.Contains("Encoding")) { @@ -176,9 +180,9 @@ internal CryptoCertificateResource(global::System.Collections.IDictionary conten { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).Fingerprint = (string) content.GetValueForProperty("Fingerprint",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).Fingerprint, global::System.Convert.ToString); } - if (content.Contains("Usage")) + if (content.Contains("CertificateUsage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).Usage = (System.Collections.Generic.List) content.GetValueForProperty("Usage",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).Usage, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateUsage = (System.Collections.Generic.List) content.GetValueForProperty("CertificateUsage",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateUsage, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("FilePath")) { @@ -200,10 +204,6 @@ internal CryptoCertificateResource(global::System.Collections.IDictionary conten { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).IsShortKeySize = (bool?) content.GetValueForProperty("IsShortKeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).IsShortKeySize, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("PairedKeyId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PairedKeyId = (string) content.GetValueForProperty("PairedKeyId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PairedKeyId, global::System.Convert.ToString); - } if (content.Contains("PairedKeyType")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PairedKeyType = (string) content.GetValueForProperty("PairedKeyType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PairedKeyType, global::System.Convert.ToString); @@ -248,6 +248,10 @@ internal CryptoCertificateResource(global::System.Collections.IDictionary conten { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).IssuerCountry = (string) content.GetValueForProperty("IssuerCountry",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).IssuerCountry, global::System.Convert.ToString); } + if (content.Contains("PairedKeyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PairedKeyId = (string) content.GetValueForProperty("PairedKeyId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PairedKeyId, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -313,6 +317,10 @@ internal CryptoCertificateResource(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PairedKey = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKey) content.GetValueForProperty("PairedKey",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PairedKey, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PairedKeyTypeConverter.ConvertFrom); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } if (content.Contains("Subject")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).Subject = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateEntity) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).Subject, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificateEntityTypeConverter.ConvertFrom); @@ -325,9 +333,9 @@ internal CryptoCertificateResource(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CryptoCertId = (string) content.GetValueForProperty("CryptoCertId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CryptoCertId, global::System.Convert.ToString); } - if (content.Contains("PropertiesName")) + if (content.Contains("CertificateName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PropertiesName = (string) content.GetValueForProperty("PropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PropertiesName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateName = (string) content.GetValueForProperty("CertificateName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateName, global::System.Convert.ToString); } if (content.Contains("IssuedDate")) { @@ -337,21 +345,21 @@ internal CryptoCertificateResource(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).ExpirationDate = (global::System.DateTime?) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).ExpirationDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } - if (content.Contains("Role")) + if (content.Contains("CertificateRole")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).Role, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateRole = (string) content.GetValueForProperty("CertificateRole",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateRole, global::System.Convert.ToString); } if (content.Contains("SignatureAlgorithm")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).SignatureAlgorithm = (string) content.GetValueForProperty("SignatureAlgorithm",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).SignatureAlgorithm, global::System.Convert.ToString); } - if (content.Contains("KeySize")) + if (content.Contains("CertificateKeySize")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).KeySize = (long?) content.GetValueForProperty("KeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).KeySize, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateKeySize = (long?) content.GetValueForProperty("CertificateKeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateKeySize, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("KeyAlgorithm")) + if (content.Contains("CertificateKeyAlgorithm")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).KeyAlgorithm = (string) content.GetValueForProperty("KeyAlgorithm",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).KeyAlgorithm, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateKeyAlgorithm = (string) content.GetValueForProperty("CertificateKeyAlgorithm",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateKeyAlgorithm, global::System.Convert.ToString); } if (content.Contains("Encoding")) { @@ -365,9 +373,9 @@ internal CryptoCertificateResource(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).Fingerprint = (string) content.GetValueForProperty("Fingerprint",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).Fingerprint, global::System.Convert.ToString); } - if (content.Contains("Usage")) + if (content.Contains("CertificateUsage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).Usage = (System.Collections.Generic.List) content.GetValueForProperty("Usage",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).Usage, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateUsage = (System.Collections.Generic.List) content.GetValueForProperty("CertificateUsage",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).CertificateUsage, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("FilePath")) { @@ -389,10 +397,6 @@ internal CryptoCertificateResource(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).IsShortKeySize = (bool?) content.GetValueForProperty("IsShortKeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).IsShortKeySize, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("PairedKeyId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PairedKeyId = (string) content.GetValueForProperty("PairedKeyId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PairedKeyId, global::System.Convert.ToString); - } if (content.Contains("PairedKeyType")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PairedKeyType = (string) content.GetValueForProperty("PairedKeyType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PairedKeyType, global::System.Convert.ToString); @@ -437,6 +441,10 @@ internal CryptoCertificateResource(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).IssuerCountry = (string) content.GetValueForProperty("IssuerCountry",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).IssuerCountry, global::System.Convert.ToString); } + if (content.Contains("PairedKeyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PairedKeyId = (string) content.GetValueForProperty("PairedKeyId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal)this).PairedKeyId, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } @@ -490,7 +498,7 @@ public override string ToString() return ToJsonString(); } } - /// Crypto certificate resource + /// The object representing a firmware analysis crypto certificate resource [System.ComponentModel.TypeConverter(typeof(CryptoCertificateResourceTypeConverter))] public partial interface ICryptoCertificateResource diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResource.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResource.cs index 2244c44afb97..c4fe64c495ec 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResource.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResource.cs @@ -7,16 +7,37 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// Crypto certificate resource + /// The object representing a firmware analysis crypto certificate resource public partial class CryptoCertificateResource : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResource, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource(); + + /// Key algorithm used in the certificate. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string CertificateKeyAlgorithm { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).CertificateKeyAlgorithm; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).CertificateKeyAlgorithm = value ?? null; } + + /// Size of the certificate's key in bits + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public long? CertificateKeySize { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).CertificateKeySize; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).CertificateKeySize = value ?? default(long); } + + /// Name of the certificate. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string CertificateName { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).CertificateName; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).CertificateName = value ?? null; } + + /// Role of the certificate (Root CA, etc) + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string CertificateRole { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).CertificateRole; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).CertificateRole = value ?? null; } + + /// List of functions the certificate can fulfill. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public System.Collections.Generic.List CertificateUsage { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).CertificateUsage; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).CertificateUsage = value ?? null /* arrayOf */; } /// ID for the certificate result. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] @@ -42,7 +63,7 @@ public partial class CryptoCertificateResource : /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id; } /// Indicates if the certificate is expired. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] @@ -53,12 +74,12 @@ public partial class CryptoCertificateResource : public bool? IsSelfSigned { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).IsSelfSigned; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).IsSelfSigned = value ?? default(bool); } /// - /// Indicates the certificate's key size is considered too small to be secure for the key algorithm. + /// Indicates the certificate's key size is considered too small to be secure for the key algorithm according to NIST guidance. /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public bool? IsShortKeySize { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).IsShortKeySize; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).IsShortKeySize = value ?? default(bool); } - /// Indicates the signature algorithm used is insecure. + /// Indicates the signature algorithm used is insecure according to NIST guidance. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public bool? IsWeakSignature { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).IsWeakSignature; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).IsWeakSignature = value ?? default(bool); } @@ -86,44 +107,57 @@ public partial class CryptoCertificateResource : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string IssuerState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).IssuerState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).IssuerState = value ?? null; } - /// Key algorithm used in the certificate. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public string KeyAlgorithm { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).KeyAlgorithm; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).KeyAlgorithm = value ?? null; } - - /// Size of the certificate's key in bits - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public long? KeySize { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).KeySize; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).KeySize = value ?? default(long); } - /// Internal Acessors for FilePath - System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal.FilePath { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).FilePath; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).FilePath = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal.FilePath { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).FilePath; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).FilePath = value ?? null /* arrayOf */; } /// Internal Acessors for Issuer - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateEntity Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal.Issuer { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).Issuer; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).Issuer = value; } + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateEntity Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal.Issuer { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).Issuer; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).Issuer = value ?? null /* model class */; } /// Internal Acessors for PairedKey - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKey Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal.PairedKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).PairedKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).PairedKey = value; } + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKey Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal.PairedKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).PairedKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).PairedKey = value ?? null /* model class */; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificate Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificate()); set { {_property = value;} } } + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).ProvisioningState = value ?? null; } + /// Internal Acessors for Subject - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateEntity Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal.Subject { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).Subject; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).Subject = value; } + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateEntity Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceInternal.Subject { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).Subject; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).Subject = value ?? null /* model class */; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name = value ?? null; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type = value ?? null; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name; } /// ID of the paired key or certificate. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] @@ -133,20 +167,16 @@ public partial class CryptoCertificateResource : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string PairedKeyType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).PairedKeyType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).PairedKeyType = value ?? null; } - /// Name of the certificate. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public string PropertiesName { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).Name = value ?? null; } - /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificate _property; - /// The properties of a crypto certificate found within a firmware image + /// The resource-specific properties for this resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificate Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificate()); set => this._property = value; } - /// Role of the certificate (Root CA, etc) + /// The status of the last operation. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public string Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).Role = value ?? null; } + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).ProvisioningState; } /// Serial number of the certificate. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] @@ -180,41 +210,37 @@ public partial class CryptoCertificateResource : /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; } + internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; } - - /// List of functions the certificate can fulfill. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public System.Collections.Generic.List Usage { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).Usage; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateInternal)Property).Usage = value ?? null /* arrayOf */; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type; } /// Creates an new instance. public CryptoCertificateResource() @@ -230,15 +256,71 @@ public CryptoCertificateResource() /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); } } - /// Crypto certificate resource + /// The object representing a firmware analysis crypto certificate resource public partial interface ICryptoCertificateResource : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResource + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource { + /// Key algorithm used in the certificate. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Key algorithm used in the certificate.", + SerializedName = @"certificateKeyAlgorithm", + PossibleTypes = new [] { typeof(string) })] + string CertificateKeyAlgorithm { get; set; } + /// Size of the certificate's key in bits + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Size of the certificate's key in bits", + SerializedName = @"certificateKeySize", + PossibleTypes = new [] { typeof(long) })] + long? CertificateKeySize { get; set; } + /// Name of the certificate. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of the certificate.", + SerializedName = @"certificateName", + PossibleTypes = new [] { typeof(string) })] + string CertificateName { get; set; } + /// Role of the certificate (Root CA, etc) + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Role of the certificate (Root CA, etc)", + SerializedName = @"certificateRole", + PossibleTypes = new [] { typeof(string) })] + string CertificateRole { get; set; } + /// List of functions the certificate can fulfill. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"List of functions the certificate can fulfill.", + SerializedName = @"certificateUsage", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("digitalSignature", "nonRepudiation", "contentCommitment", "keyEncipherment", "dataEncipherment", "keyAgreement", "keyCertSign", "crlSign", "encipherOnly", "decipherOnly", "serverAuth", "clientAuth", "codeSigning", "emailProtection", "timeStamping", "ocspSigning")] + System.Collections.Generic.List CertificateUsage { get; set; } /// ID for the certificate result. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -317,7 +399,7 @@ public partial interface ICryptoCertificateResource : PossibleTypes = new [] { typeof(bool) })] bool? IsSelfSigned { get; set; } /// - /// Indicates the certificate's key size is considered too small to be secure for the key algorithm. + /// Indicates the certificate's key size is considered too small to be secure for the key algorithm according to NIST guidance. /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -325,18 +407,18 @@ public partial interface ICryptoCertificateResource : Read = true, Create = true, Update = true, - Description = @"Indicates the certificate's key size is considered too small to be secure for the key algorithm.", + Description = @"Indicates the certificate's key size is considered too small to be secure for the key algorithm according to NIST guidance.", SerializedName = @"isShortKeySize", PossibleTypes = new [] { typeof(bool) })] bool? IsShortKeySize { get; set; } - /// Indicates the signature algorithm used is insecure. + /// Indicates the signature algorithm used is insecure according to NIST guidance. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Indicates the signature algorithm used is insecure.", + Description = @"Indicates the signature algorithm used is insecure according to NIST guidance.", SerializedName = @"isWeakSignature", PossibleTypes = new [] { typeof(bool) })] bool? IsWeakSignature { get; set; } @@ -406,28 +488,6 @@ public partial interface ICryptoCertificateResource : SerializedName = @"state", PossibleTypes = new [] { typeof(string) })] string IssuerState { get; set; } - /// Key algorithm used in the certificate. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"Key algorithm used in the certificate.", - SerializedName = @"keyAlgorithm", - PossibleTypes = new [] { typeof(string) })] - string KeyAlgorithm { get; set; } - /// Size of the certificate's key in bits - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"Size of the certificate's key in bits", - SerializedName = @"keySize", - PossibleTypes = new [] { typeof(long) })] - long? KeySize { get; set; } /// ID of the paired key or certificate. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -436,7 +496,7 @@ public partial interface ICryptoCertificateResource : Create = true, Update = true, Description = @"ID of the paired key or certificate.", - SerializedName = @"id", + SerializedName = @"pairedKeyId", PossibleTypes = new [] { typeof(string) })] string PairedKeyId { get; set; } /// The type indicating whether the paired object is a key or certificate. @@ -450,28 +510,18 @@ public partial interface ICryptoCertificateResource : SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] string PairedKeyType { get; set; } - /// Name of the certificate. + /// The status of the last operation. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"Name of the certificate.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string PropertiesName { get; set; } - /// Role of the certificate (Root CA, etc) - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = false, + ReadOnly = true, Read = true, - Create = true, - Update = true, - Description = @"Role of the certificate (Root CA, etc)", - SerializedName = @"role", + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(string) })] - string Role { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; } /// Serial number of the certificate. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -549,23 +599,23 @@ public partial interface ICryptoCertificateResource : SerializedName = @"state", PossibleTypes = new [] { typeof(string) })] string SubjectState { get; set; } - /// List of functions the certificate can fulfill. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"List of functions the certificate can fulfill.", - SerializedName = @"usage", - PossibleTypes = new [] { typeof(string) })] - System.Collections.Generic.List Usage { get; set; } } - /// Crypto certificate resource + /// The object representing a firmware analysis crypto certificate resource internal partial interface ICryptoCertificateResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResourceInternal { + /// Key algorithm used in the certificate. + string CertificateKeyAlgorithm { get; set; } + /// Size of the certificate's key in bits + long? CertificateKeySize { get; set; } + /// Name of the certificate. + string CertificateName { get; set; } + /// Role of the certificate (Root CA, etc) + string CertificateRole { get; set; } + /// List of functions the certificate can fulfill. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("digitalSignature", "nonRepudiation", "contentCommitment", "keyEncipherment", "dataEncipherment", "keyAgreement", "keyCertSign", "crlSign", "encipherOnly", "decipherOnly", "serverAuth", "clientAuth", "codeSigning", "emailProtection", "timeStamping", "ocspSigning")] + System.Collections.Generic.List CertificateUsage { get; set; } /// ID for the certificate result. string CryptoCertId { get; set; } /// Encoding used for the certificate. @@ -581,10 +631,10 @@ internal partial interface ICryptoCertificateResourceInternal : /// Indicates if the certificate is self-signed. bool? IsSelfSigned { get; set; } /// - /// Indicates the certificate's key size is considered too small to be secure for the key algorithm. + /// Indicates the certificate's key size is considered too small to be secure for the key algorithm according to NIST guidance. /// bool? IsShortKeySize { get; set; } - /// Indicates the signature algorithm used is insecure. + /// Indicates the signature algorithm used is insecure according to NIST guidance. bool? IsWeakSignature { get; set; } /// Issue date for the certificate. global::System.DateTime? IssuedDate { get; set; } @@ -600,22 +650,17 @@ internal partial interface ICryptoCertificateResourceInternal : string IssuerOrganizationalUnit { get; set; } /// Geographical state or province of the certificate entity. string IssuerState { get; set; } - /// Key algorithm used in the certificate. - string KeyAlgorithm { get; set; } - /// Size of the certificate's key in bits - long? KeySize { get; set; } /// A matching paired private key. Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKey PairedKey { get; set; } /// ID of the paired key or certificate. string PairedKeyId { get; set; } /// The type indicating whether the paired object is a key or certificate. string PairedKeyType { get; set; } - /// Name of the certificate. - string PropertiesName { get; set; } - /// The properties of a crypto certificate found within a firmware image + /// The resource-specific properties for this resource. Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificate Property { get; set; } - /// Role of the certificate (Root CA, etc) - string Role { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; set; } /// Serial number of the certificate. string SerialNumber { get; set; } /// The signature algorithm used in the certificate. @@ -632,8 +677,6 @@ internal partial interface ICryptoCertificateResourceInternal : string SubjectOrganizationalUnit { get; set; } /// Geographical state or province of the certificate entity. string SubjectState { get; set; } - /// List of functions the certificate can fulfill. - System.Collections.Generic.List Usage { get; set; } } } \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResource.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResource.json.cs index 9c761f23d070..e7d880a991cf 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResource.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResource.json.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// Crypto certificate resource + /// The object representing a firmware analysis crypto certificate resource public partial class CryptoCertificateResource { @@ -65,7 +65,7 @@ internal CryptoCertificateResource(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAn { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Resource(json); + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource(json); {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificate.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResourceListResult.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResourceListResult.PowerShell.cs new file mode 100644 index 000000000000..a1dcb7164ca2 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResourceListResult.PowerShell.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + + /// The response of a CryptoCertificateResource list operation. + [System.ComponentModel.TypeConverter(typeof(CryptoCertificateResourceListResultTypeConverter))] + public partial class CryptoCertificateResourceListResult + { + + /// + /// 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 CryptoCertificateResourceListResult(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.FirmwareAnalysis.Models.ICryptoCertificateResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificateResourceTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CryptoCertificateResourceListResult(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.FirmwareAnalysis.Models.ICryptoCertificateResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificateResourceTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CryptoCertificateResourceListResult(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.FirmwareAnalysis.Models.ICryptoCertificateResourceListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CryptoCertificateResourceListResult(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.FirmwareAnalysis.Models.ICryptoCertificateResourceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a CryptoCertificateResource list operation. + [System.ComponentModel.TypeConverter(typeof(CryptoCertificateResourceListResultTypeConverter))] + public partial interface ICryptoCertificateResourceListResult + + { + + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResourceListResult.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResourceListResult.TypeConverter.cs new file mode 100644 index 000000000000..6c852d48cb05 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResourceListResult.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.FirmwareAnalysis.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CryptoCertificateResourceListResultTypeConverter : 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.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Models.ICryptoCertificateResourceListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CryptoCertificateResourceListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CryptoCertificateResourceListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CryptoCertificateResourceListResult.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/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateListResult.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResourceListResult.cs similarity index 62% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateListResult.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResourceListResult.cs index d0725e3110b7..3ff1c5a4620b 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateListResult.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResourceListResult.cs @@ -7,70 +7,67 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// List of crypto certificates. - public partial class CryptoCertificateListResult : - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateListResult, - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateListResultInternal + /// The response of a CryptoCertificateResource list operation. + public partial class CryptoCertificateResourceListResult : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceListResult, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceListResultInternal { - /// Internal Acessors for Value - System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateListResultInternal.Value { get => this._value; set { {_value = value;} } } - /// Backing field for property. private string _nextLink; - /// The uri to fetch the next page of resources. + /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. private System.Collections.Generic.List _value; - /// The list of crypto certificate results. + /// The CryptoCertificateResource items on this page [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public System.Collections.Generic.List Value { get => this._value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } - /// Creates an new instance. - public CryptoCertificateListResult() + /// Creates an new instance. + public CryptoCertificateResourceListResult() { } } - /// List of crypto certificates. - public partial interface ICryptoCertificateListResult : + /// The response of a CryptoCertificateResource list operation. + public partial interface ICryptoCertificateResourceListResult : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable { - /// The uri to fetch the next page of resources. + /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The uri to fetch the next page of resources.", + Description = @"The link to the next page of items", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] string NextLink { get; set; } - /// The list of crypto certificate results. + /// The CryptoCertificateResource items on this page [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = true, + Required = true, + ReadOnly = false, Read = true, - Create = false, - Update = false, - Description = @"The list of crypto certificate results.", + Create = true, + Update = true, + Description = @"The CryptoCertificateResource items on this page", SerializedName = @"value", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResource) })] - System.Collections.Generic.List Value { get; } + System.Collections.Generic.List Value { get; set; } } - /// List of crypto certificates. - internal partial interface ICryptoCertificateListResultInternal + /// The response of a CryptoCertificateResource list operation. + internal partial interface ICryptoCertificateResourceListResultInternal { - /// The uri to fetch the next page of resources. + /// The link to the next page of items string NextLink { get; set; } - /// The list of crypto certificate results. + /// The CryptoCertificateResource items on this page System.Collections.Generic.List Value { get; set; } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateListResult.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResourceListResult.json.cs similarity index 85% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateListResult.json.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResourceListResult.json.cs index fa81da34bc4b..c2540e2727e0 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateListResult.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateResourceListResult.json.cs @@ -7,8 +7,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// List of crypto certificates. - public partial class CryptoCertificateListResult + /// The response of a CryptoCertificateResource list operation. + public partial class CryptoCertificateResourceListResult { /// @@ -54,10 +54,10 @@ public partial class CryptoCertificateListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject instance to deserialize from. - internal CryptoCertificateListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) + internal CryptoCertificateResourceListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -71,25 +71,26 @@ internal CryptoCertificateListResult(Microsoft.Azure.PowerShell.Cmdlets.Firmware } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new CryptoCertificateListResult(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new CryptoCertificateResourceListResult(json) : null; } /// - /// Serializes this instance of into a . + /// 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 . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode) { @@ -101,17 +102,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) + if (null != this._value) { - if (null != this._value) + var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); - foreach( var __x in this._value ) - { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); - } - container.Add("value",__w); + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); } + container.Add("value",__w); } AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); AfterToJson(ref container); diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateSummaryResource.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateSummaryResource.PowerShell.cs index 131feed2c8b5..648ff03e8c2a 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateSummaryResource.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateSummaryResource.PowerShell.cs @@ -76,38 +76,42 @@ internal CryptoCertificateSummaryResource(global::System.Collections.IDictionary return; } // actually deserialize - if (content.Contains("TotalCertificate")) + if (content.Contains("TotalCertificateCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).TotalCertificate = (long?) content.GetValueForProperty("TotalCertificate",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).TotalCertificate, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).TotalCertificateCount = (long?) content.GetValueForProperty("TotalCertificateCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).TotalCertificateCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("PairedKey")) + if (content.Contains("PairedKeyCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).PairedKey = (long?) content.GetValueForProperty("PairedKey",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).PairedKey, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).PairedKeyCount = (long?) content.GetValueForProperty("PairedKeyCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).PairedKeyCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("Expired")) + if (content.Contains("ExpiredCertificateCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).Expired = (long?) content.GetValueForProperty("Expired",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).Expired, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ExpiredCertificateCount = (long?) content.GetValueForProperty("ExpiredCertificateCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ExpiredCertificateCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("ExpiringSoon")) + if (content.Contains("ExpiringSoonCertificateCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ExpiringSoon = (long?) content.GetValueForProperty("ExpiringSoon",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ExpiringSoon, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ExpiringSoonCertificateCount = (long?) content.GetValueForProperty("ExpiringSoonCertificateCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ExpiringSoonCertificateCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("WeakSignature")) + if (content.Contains("WeakSignatureCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).WeakSignature = (long?) content.GetValueForProperty("WeakSignature",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).WeakSignature, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).WeakSignatureCount = (long?) content.GetValueForProperty("WeakSignatureCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).WeakSignatureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("SelfSigned")) + if (content.Contains("SelfSignedCertificateCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).SelfSigned = (long?) content.GetValueForProperty("SelfSigned",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).SelfSigned, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).SelfSignedCertificateCount = (long?) content.GetValueForProperty("SelfSignedCertificateCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).SelfSignedCertificateCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("ShortKeySize")) + if (content.Contains("ShortKeySizeCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ShortKeySize = (long?) content.GetValueForProperty("ShortKeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ShortKeySize, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ShortKeySizeCount = (long?) content.GetValueForProperty("ShortKeySizeCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ShortKeySizeCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SummaryType")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType = (string) content.GetValueForProperty("SummaryType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -125,38 +129,42 @@ internal CryptoCertificateSummaryResource(global::System.Management.Automation.P return; } // actually deserialize - if (content.Contains("TotalCertificate")) + if (content.Contains("TotalCertificateCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).TotalCertificate = (long?) content.GetValueForProperty("TotalCertificate",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).TotalCertificate, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).TotalCertificateCount = (long?) content.GetValueForProperty("TotalCertificateCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).TotalCertificateCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("PairedKey")) + if (content.Contains("PairedKeyCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).PairedKey = (long?) content.GetValueForProperty("PairedKey",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).PairedKey, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).PairedKeyCount = (long?) content.GetValueForProperty("PairedKeyCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).PairedKeyCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("Expired")) + if (content.Contains("ExpiredCertificateCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).Expired = (long?) content.GetValueForProperty("Expired",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).Expired, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ExpiredCertificateCount = (long?) content.GetValueForProperty("ExpiredCertificateCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ExpiredCertificateCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("ExpiringSoon")) + if (content.Contains("ExpiringSoonCertificateCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ExpiringSoon = (long?) content.GetValueForProperty("ExpiringSoon",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ExpiringSoon, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ExpiringSoonCertificateCount = (long?) content.GetValueForProperty("ExpiringSoonCertificateCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ExpiringSoonCertificateCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("WeakSignature")) + if (content.Contains("WeakSignatureCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).WeakSignature = (long?) content.GetValueForProperty("WeakSignature",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).WeakSignature, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).WeakSignatureCount = (long?) content.GetValueForProperty("WeakSignatureCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).WeakSignatureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("SelfSigned")) + if (content.Contains("SelfSignedCertificateCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).SelfSigned = (long?) content.GetValueForProperty("SelfSigned",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).SelfSigned, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).SelfSignedCertificateCount = (long?) content.GetValueForProperty("SelfSignedCertificateCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).SelfSignedCertificateCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("ShortKeySize")) + if (content.Contains("ShortKeySizeCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ShortKeySize = (long?) content.GetValueForProperty("ShortKeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ShortKeySize, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ShortKeySizeCount = (long?) content.GetValueForProperty("ShortKeySizeCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateSummaryResourceInternal)this).ShortKeySizeCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SummaryType")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType = (string) content.GetValueForProperty("SummaryType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateSummaryResource.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateSummaryResource.cs index d5cbf7189419..1cca6dd67fd6 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateSummaryResource.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateSummaryResource.cs @@ -19,61 +19,68 @@ public partial class CryptoCertificateSummaryResource : /// private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceProperties __summaryResourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceProperties(); - /// Backing field for property. - private long? _expired; + /// Backing field for property. + private long? _expiredCertificateCount; /// Total number of expired certificates found. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public long? Expired { get => this._expired; set => this._expired = value; } + public long? ExpiredCertificateCount { get => this._expiredCertificateCount; set => this._expiredCertificateCount = value; } - /// Backing field for property. - private long? _expiringSoon; + /// Backing field for property. + private long? _expiringSoonCertificateCount; /// Total number of nearly expired certificates found. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public long? ExpiringSoon { get => this._expiringSoon; set => this._expiringSoon = value; } + public long? ExpiringSoonCertificateCount { get => this._expiringSoonCertificateCount; set => this._expiringSoonCertificateCount = value; } - /// Backing field for property. - private long? _pairedKey; + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).ProvisioningState = value ?? null; } + + /// Backing field for property. + private long? _pairedKeyCount; /// Total number of paired private keys found for the certificates. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public long? PairedKey { get => this._pairedKey; set => this._pairedKey = value; } + public long? PairedKeyCount { get => this._pairedKeyCount; set => this._pairedKeyCount = value; } + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).ProvisioningState; } - /// Backing field for property. - private long? _selfSigned; + /// Backing field for property. + private long? _selfSignedCertificateCount; /// Total number of certificates found that are self-signed. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public long? SelfSigned { get => this._selfSigned; set => this._selfSigned = value; } + public long? SelfSignedCertificateCount { get => this._selfSignedCertificateCount; set => this._selfSignedCertificateCount = value; } - /// Backing field for property. - private long? _shortKeySize; + /// Backing field for property. + private long? _shortKeySizeCount; /// /// Total number of certificates found that have an insecure key size for the key algorithm. /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public long? ShortKeySize { get => this._shortKeySize; set => this._shortKeySize = value; } + public long? ShortKeySizeCount { get => this._shortKeySizeCount; set => this._shortKeySizeCount = value; } - /// Describes the type of summary. + /// The type of summary. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Constant] [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] public string SummaryType { get => "CryptoCertificate"; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).SummaryType = "CryptoCertificate"; } - /// Backing field for property. - private long? _totalCertificate; + /// Backing field for property. + private long? _totalCertificateCount; /// Total number of certificates found. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public long? TotalCertificate { get => this._totalCertificate; set => this._totalCertificate = value; } + public long? TotalCertificateCount { get => this._totalCertificateCount; set => this._totalCertificateCount = value; } - /// Backing field for property. - private long? _weakSignature; + /// Backing field for property. + private long? _weakSignatureCount; /// Total number of certificates found using a weak signature algorithm. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public long? WeakSignature { get => this._weakSignature; set => this._weakSignature = value; } + public long? WeakSignatureCount { get => this._weakSignatureCount; set => this._weakSignatureCount = value; } /// Creates an new instance. public CryptoCertificateSummaryResource() @@ -106,9 +113,9 @@ public partial interface ICryptoCertificateSummaryResource : Create = true, Update = true, Description = @"Total number of expired certificates found.", - SerializedName = @"expired", + SerializedName = @"expiredCertificateCount", PossibleTypes = new [] { typeof(long) })] - long? Expired { get; set; } + long? ExpiredCertificateCount { get; set; } /// Total number of nearly expired certificates found. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -117,9 +124,9 @@ public partial interface ICryptoCertificateSummaryResource : Create = true, Update = true, Description = @"Total number of nearly expired certificates found.", - SerializedName = @"expiringSoon", + SerializedName = @"expiringSoonCertificateCount", PossibleTypes = new [] { typeof(long) })] - long? ExpiringSoon { get; set; } + long? ExpiringSoonCertificateCount { get; set; } /// Total number of paired private keys found for the certificates. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -128,9 +135,9 @@ public partial interface ICryptoCertificateSummaryResource : Create = true, Update = true, Description = @"Total number of paired private keys found for the certificates.", - SerializedName = @"pairedKeys", + SerializedName = @"pairedKeyCount", PossibleTypes = new [] { typeof(long) })] - long? PairedKey { get; set; } + long? PairedKeyCount { get; set; } /// Total number of certificates found that are self-signed. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -139,9 +146,9 @@ public partial interface ICryptoCertificateSummaryResource : Create = true, Update = true, Description = @"Total number of certificates found that are self-signed.", - SerializedName = @"selfSigned", + SerializedName = @"selfSignedCertificateCount", PossibleTypes = new [] { typeof(long) })] - long? SelfSigned { get; set; } + long? SelfSignedCertificateCount { get; set; } /// /// Total number of certificates found that have an insecure key size for the key algorithm. /// @@ -152,9 +159,9 @@ public partial interface ICryptoCertificateSummaryResource : Create = true, Update = true, Description = @"Total number of certificates found that have an insecure key size for the key algorithm.", - SerializedName = @"shortKeySize", + SerializedName = @"shortKeySizeCount", PossibleTypes = new [] { typeof(long) })] - long? ShortKeySize { get; set; } + long? ShortKeySizeCount { get; set; } /// Total number of certificates found. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -163,9 +170,9 @@ public partial interface ICryptoCertificateSummaryResource : Create = true, Update = true, Description = @"Total number of certificates found.", - SerializedName = @"totalCertificates", + SerializedName = @"totalCertificateCount", PossibleTypes = new [] { typeof(long) })] - long? TotalCertificate { get; set; } + long? TotalCertificateCount { get; set; } /// Total number of certificates found using a weak signature algorithm. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -174,9 +181,9 @@ public partial interface ICryptoCertificateSummaryResource : Create = true, Update = true, Description = @"Total number of certificates found using a weak signature algorithm.", - SerializedName = @"weakSignature", + SerializedName = @"weakSignatureCount", PossibleTypes = new [] { typeof(long) })] - long? WeakSignature { get; set; } + long? WeakSignatureCount { get; set; } } /// Properties for cryptographic certificate summary. @@ -184,21 +191,21 @@ internal partial interface ICryptoCertificateSummaryResourceInternal : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal { /// Total number of expired certificates found. - long? Expired { get; set; } + long? ExpiredCertificateCount { get; set; } /// Total number of nearly expired certificates found. - long? ExpiringSoon { get; set; } + long? ExpiringSoonCertificateCount { get; set; } /// Total number of paired private keys found for the certificates. - long? PairedKey { get; set; } + long? PairedKeyCount { get; set; } /// Total number of certificates found that are self-signed. - long? SelfSigned { get; set; } + long? SelfSignedCertificateCount { get; set; } /// /// Total number of certificates found that have an insecure key size for the key algorithm. /// - long? ShortKeySize { get; set; } + long? ShortKeySizeCount { get; set; } /// Total number of certificates found. - long? TotalCertificate { get; set; } + long? TotalCertificateCount { get; set; } /// Total number of certificates found using a weak signature algorithm. - long? WeakSignature { get; set; } + long? WeakSignatureCount { get; set; } } } \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateSummaryResource.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateSummaryResource.json.cs index 8e99fe86482b..62c98b4ba4c3 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateSummaryResource.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateSummaryResource.json.cs @@ -66,13 +66,13 @@ internal CryptoCertificateSummaryResource(Microsoft.Azure.PowerShell.Cmdlets.Fir return; } __summaryResourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceProperties(json); - {_totalCertificate = If( json?.PropertyT("totalCertificates"), out var __jsonTotalCertificates) ? (long?)__jsonTotalCertificates : _totalCertificate;} - {_pairedKey = If( json?.PropertyT("pairedKeys"), out var __jsonPairedKeys) ? (long?)__jsonPairedKeys : _pairedKey;} - {_expired = If( json?.PropertyT("expired"), out var __jsonExpired) ? (long?)__jsonExpired : _expired;} - {_expiringSoon = If( json?.PropertyT("expiringSoon"), out var __jsonExpiringSoon) ? (long?)__jsonExpiringSoon : _expiringSoon;} - {_weakSignature = If( json?.PropertyT("weakSignature"), out var __jsonWeakSignature) ? (long?)__jsonWeakSignature : _weakSignature;} - {_selfSigned = If( json?.PropertyT("selfSigned"), out var __jsonSelfSigned) ? (long?)__jsonSelfSigned : _selfSigned;} - {_shortKeySize = If( json?.PropertyT("shortKeySize"), out var __jsonShortKeySize) ? (long?)__jsonShortKeySize : _shortKeySize;} + {_totalCertificateCount = If( json?.PropertyT("totalCertificateCount"), out var __jsonTotalCertificateCount) ? (long?)__jsonTotalCertificateCount : _totalCertificateCount;} + {_pairedKeyCount = If( json?.PropertyT("pairedKeyCount"), out var __jsonPairedKeyCount) ? (long?)__jsonPairedKeyCount : _pairedKeyCount;} + {_expiredCertificateCount = If( json?.PropertyT("expiredCertificateCount"), out var __jsonExpiredCertificateCount) ? (long?)__jsonExpiredCertificateCount : _expiredCertificateCount;} + {_expiringSoonCertificateCount = If( json?.PropertyT("expiringSoonCertificateCount"), out var __jsonExpiringSoonCertificateCount) ? (long?)__jsonExpiringSoonCertificateCount : _expiringSoonCertificateCount;} + {_weakSignatureCount = If( json?.PropertyT("weakSignatureCount"), out var __jsonWeakSignatureCount) ? (long?)__jsonWeakSignatureCount : _weakSignatureCount;} + {_selfSignedCertificateCount = If( json?.PropertyT("selfSignedCertificateCount"), out var __jsonSelfSignedCertificateCount) ? (long?)__jsonSelfSignedCertificateCount : _selfSignedCertificateCount;} + {_shortKeySizeCount = If( json?.PropertyT("shortKeySizeCount"), out var __jsonShortKeySizeCount) ? (long?)__jsonShortKeySizeCount : _shortKeySizeCount;} AfterFromJson(json); } @@ -108,13 +108,13 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode return container; } __summaryResourceProperties?.ToJson(container, serializationMode); - AddIf( null != this._totalCertificate ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._totalCertificate) : null, "totalCertificates" ,container.Add ); - AddIf( null != this._pairedKey ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._pairedKey) : null, "pairedKeys" ,container.Add ); - AddIf( null != this._expired ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._expired) : null, "expired" ,container.Add ); - AddIf( null != this._expiringSoon ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._expiringSoon) : null, "expiringSoon" ,container.Add ); - AddIf( null != this._weakSignature ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._weakSignature) : null, "weakSignature" ,container.Add ); - AddIf( null != this._selfSigned ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._selfSigned) : null, "selfSigned" ,container.Add ); - AddIf( null != this._shortKeySize ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._shortKeySize) : null, "shortKeySize" ,container.Add ); + AddIf( null != this._totalCertificateCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._totalCertificateCount) : null, "totalCertificateCount" ,container.Add ); + AddIf( null != this._pairedKeyCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._pairedKeyCount) : null, "pairedKeyCount" ,container.Add ); + AddIf( null != this._expiredCertificateCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._expiredCertificateCount) : null, "expiredCertificateCount" ,container.Add ); + AddIf( null != this._expiringSoonCertificateCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._expiringSoonCertificateCount) : null, "expiringSoonCertificateCount" ,container.Add ); + AddIf( null != this._weakSignatureCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._weakSignatureCount) : null, "weakSignatureCount" ,container.Add ); + AddIf( null != this._selfSignedCertificateCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._selfSignedCertificateCount) : null, "selfSignedCertificateCount" ,container.Add ); + AddIf( null != this._shortKeySizeCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._shortKeySizeCount) : null, "shortKeySizeCount" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKey.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKey.PowerShell.cs index 0b32c15cb7a8..30ddac120eb7 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKey.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKey.PowerShell.cs @@ -88,9 +88,9 @@ internal CryptoKey(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).KeyType = (string) content.GetValueForProperty("KeyType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).KeyType, global::System.Convert.ToString); } - if (content.Contains("KeySize")) + if (content.Contains("Size")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).KeySize = (long?) content.GetValueForProperty("KeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).KeySize, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).Size = (long?) content.GetValueForProperty("Size",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).Size, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("KeyAlgorithm")) { @@ -108,14 +108,18 @@ internal CryptoKey(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).IsShortKeySize = (bool?) content.GetValueForProperty("IsShortKeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).IsShortKeySize, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("PairedKeyId")) + if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).PairedKeyId = (string) content.GetValueForProperty("PairedKeyId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).PairedKeyId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PairedKeyType")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).PairedKeyType = (string) content.GetValueForProperty("PairedKeyType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).PairedKeyType, global::System.Convert.ToString); } + if (content.Contains("PairedKeyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).PairedKeyId = (string) content.GetValueForProperty("PairedKeyId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).PairedKeyId, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -145,9 +149,9 @@ internal CryptoKey(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).KeyType = (string) content.GetValueForProperty("KeyType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).KeyType, global::System.Convert.ToString); } - if (content.Contains("KeySize")) + if (content.Contains("Size")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).KeySize = (long?) content.GetValueForProperty("KeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).KeySize, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).Size = (long?) content.GetValueForProperty("Size",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).Size, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("KeyAlgorithm")) { @@ -165,14 +169,18 @@ internal CryptoKey(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).IsShortKeySize = (bool?) content.GetValueForProperty("IsShortKeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).IsShortKeySize, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("PairedKeyId")) + if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).PairedKeyId = (string) content.GetValueForProperty("PairedKeyId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).PairedKeyId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PairedKeyType")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).PairedKeyType = (string) content.GetValueForProperty("PairedKeyType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).PairedKeyType, global::System.Convert.ToString); } + if (content.Contains("PairedKeyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).PairedKeyId = (string) content.GetValueForProperty("PairedKeyId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)this).PairedKeyId, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKey.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKey.cs index f2a12bb4e15a..e349e401412b 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKey.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKey.cs @@ -30,7 +30,9 @@ public partial class CryptoKey : /// Backing field for property. private bool? _isShortKeySize; - /// Indicates the key size is considered too small to be secure for the algorithm. + /// + /// Indicates the key size is considered too small to be secure for the algorithm according to NIST guidance. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public bool? IsShortKeySize { get => this._isShortKeySize; set => this._isShortKeySize = value; } @@ -41,13 +43,6 @@ public partial class CryptoKey : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string KeyAlgorithm { get => this._keyAlgorithm; set => this._keyAlgorithm = value; } - /// Backing field for property. - private long? _keySize; - - /// Size of the key in bits. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public long? KeySize { get => this._keySize; set => this._keySize = value; } - /// Backing field for property. private string _keyType; @@ -61,6 +56,9 @@ public partial class CryptoKey : /// Internal Acessors for PairedKey Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKey Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal.PairedKey { get => (this._pairedKey = this._pairedKey ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PairedKey()); set { {_pairedKey = value;} } } + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKey _pairedKey; @@ -76,6 +74,20 @@ public partial class CryptoKey : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string PairedKeyType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKeyInternal)PairedKey).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKeyInternal)PairedKey).Type = value ?? null; } + /// Backing field for property. + private string _provisioningState; + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private long? _size; + + /// Size of the key in bits. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public long? Size { get => this._size; set => this._size = value; } + /// Backing field for property. private System.Collections.Generic.List _usage; @@ -115,14 +127,16 @@ public partial interface ICryptoKey : SerializedName = @"cryptoKeyId", PossibleTypes = new [] { typeof(string) })] string Id { get; set; } - /// Indicates the key size is considered too small to be secure for the algorithm. + /// + /// Indicates the key size is considered too small to be secure for the algorithm according to NIST guidance. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Indicates the key size is considered too small to be secure for the algorithm.", + Description = @"Indicates the key size is considered too small to be secure for the algorithm according to NIST guidance.", SerializedName = @"isShortKeySize", PossibleTypes = new [] { typeof(bool) })] bool? IsShortKeySize { get; set; } @@ -137,17 +151,6 @@ public partial interface ICryptoKey : SerializedName = @"keyAlgorithm", PossibleTypes = new [] { typeof(string) })] string KeyAlgorithm { get; set; } - /// Size of the key in bits. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"Size of the key in bits.", - SerializedName = @"keySize", - PossibleTypes = new [] { typeof(long) })] - long? KeySize { get; set; } /// Type of the key (public or private). [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -158,6 +161,7 @@ public partial interface ICryptoKey : Description = @"Type of the key (public or private).", SerializedName = @"keyType", PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Public", "Private")] string KeyType { get; set; } /// ID of the paired key or certificate. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( @@ -167,7 +171,7 @@ public partial interface ICryptoKey : Create = true, Update = true, Description = @"ID of the paired key or certificate.", - SerializedName = @"id", + SerializedName = @"pairedKeyId", PossibleTypes = new [] { typeof(string) })] string PairedKeyId { get; set; } /// The type indicating whether the paired object is a key or certificate. @@ -181,6 +185,29 @@ public partial interface ICryptoKey : SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] string PairedKeyType { get; set; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; } + /// Size of the key in bits. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Size of the key in bits.", + SerializedName = @"cryptoKeySize", + PossibleTypes = new [] { typeof(long) })] + long? Size { get; set; } /// Functions the key can fulfill. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -202,13 +229,14 @@ internal partial interface ICryptoKeyInternal System.Collections.Generic.List FilePath { get; set; } /// ID for the key result. string Id { get; set; } - /// Indicates the key size is considered too small to be secure for the algorithm. + /// + /// Indicates the key size is considered too small to be secure for the algorithm according to NIST guidance. + /// bool? IsShortKeySize { get; set; } /// Key algorithm name. string KeyAlgorithm { get; set; } - /// Size of the key in bits. - long? KeySize { get; set; } /// Type of the key (public or private). + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Public", "Private")] string KeyType { get; set; } /// A matching paired key or certificate. Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKey PairedKey { get; set; } @@ -216,6 +244,11 @@ internal partial interface ICryptoKeyInternal string PairedKeyId { get; set; } /// The type indicating whether the paired object is a key or certificate. string PairedKeyType { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; set; } + /// Size of the key in bits. + long? Size { get; set; } /// Functions the key can fulfill. System.Collections.Generic.List Usage { get; set; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKey.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKey.json.cs index 20a349c325dd..c19f123a7f1b 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKey.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKey.json.cs @@ -68,11 +68,12 @@ internal CryptoKey(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.J {_pairedKey = If( json?.PropertyT("pairedKey"), out var __jsonPairedKey) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PairedKey.FromJson(__jsonPairedKey) : _pairedKey;} {_id = If( json?.PropertyT("cryptoKeyId"), out var __jsonCryptoKeyId) ? (string)__jsonCryptoKeyId : (string)_id;} {_keyType = If( json?.PropertyT("keyType"), out var __jsonKeyType) ? (string)__jsonKeyType : (string)_keyType;} - {_keySize = If( json?.PropertyT("keySize"), out var __jsonKeySize) ? (long?)__jsonKeySize : _keySize;} + {_size = If( json?.PropertyT("cryptoKeySize"), out var __jsonCryptoKeySize) ? (long?)__jsonCryptoKeySize : _size;} {_keyAlgorithm = If( json?.PropertyT("keyAlgorithm"), out var __jsonKeyAlgorithm) ? (string)__jsonKeyAlgorithm : (string)_keyAlgorithm;} {_usage = If( json?.PropertyT("usage"), out var __jsonUsage) ? If( __jsonUsage as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _usage;} {_filePath = If( json?.PropertyT("filePaths"), out var __jsonFilePaths) ? If( __jsonFilePaths as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : _filePath;} {_isShortKeySize = If( json?.PropertyT("isShortKeySize"), out var __jsonIsShortKeySize) ? (bool?)__jsonIsShortKeySize : _isShortKeySize;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} AfterFromJson(json); } @@ -110,7 +111,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode AddIf( null != this._pairedKey ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._pairedKey.ToJson(null,serializationMode) : null, "pairedKey" ,container.Add ); AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._id.ToString()) : null, "cryptoKeyId" ,container.Add ); AddIf( null != (((object)this._keyType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._keyType.ToString()) : null, "keyType" ,container.Add ); - AddIf( null != this._keySize ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._keySize) : null, "keySize" ,container.Add ); + AddIf( null != this._size ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._size) : null, "cryptoKeySize" ,container.Add ); AddIf( null != (((object)this._keyAlgorithm)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._keyAlgorithm.ToString()) : null, "keyAlgorithm" ,container.Add ); if (null != this._usage) { @@ -134,6 +135,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode } } AddIf( null != this._isShortKeySize ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonBoolean((bool)this._isShortKeySize) : null, "isShortKeySize" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResource.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResource.PowerShell.cs index 9388985f1955..f3dc07153ecd 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResource.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResource.PowerShell.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; - /// Crypto key resource + /// The object representing a firmware analysis crypto key resource [System.ComponentModel.TypeConverter(typeof(CryptoKeyResourceTypeConverter))] public partial class CryptoKeyResource { @@ -124,6 +124,10 @@ internal CryptoKeyResource(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).PairedKey = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKey) content.GetValueForProperty("PairedKey",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).PairedKey, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PairedKeyTypeConverter.ConvertFrom); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } if (content.Contains("CryptoKeyId")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).CryptoKeyId = (string) content.GetValueForProperty("CryptoKeyId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).CryptoKeyId, global::System.Convert.ToString); @@ -132,9 +136,9 @@ internal CryptoKeyResource(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).KeyType = (string) content.GetValueForProperty("KeyType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).KeyType, global::System.Convert.ToString); } - if (content.Contains("KeySize")) + if (content.Contains("CryptoKeySize")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).KeySize = (long?) content.GetValueForProperty("KeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).KeySize, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).CryptoKeySize = (long?) content.GetValueForProperty("CryptoKeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).CryptoKeySize, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("KeyAlgorithm")) { @@ -152,14 +156,14 @@ internal CryptoKeyResource(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).IsShortKeySize = (bool?) content.GetValueForProperty("IsShortKeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).IsShortKeySize, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("PairedKeyId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).PairedKeyId = (string) content.GetValueForProperty("PairedKeyId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).PairedKeyId, global::System.Convert.ToString); - } if (content.Contains("PairedKeyType")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).PairedKeyType = (string) content.GetValueForProperty("PairedKeyType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).PairedKeyType, global::System.Convert.ToString); } + if (content.Contains("PairedKeyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).PairedKeyId = (string) content.GetValueForProperty("PairedKeyId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).PairedKeyId, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -225,6 +229,10 @@ internal CryptoKeyResource(global::System.Management.Automation.PSObject content { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).PairedKey = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKey) content.GetValueForProperty("PairedKey",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).PairedKey, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PairedKeyTypeConverter.ConvertFrom); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } if (content.Contains("CryptoKeyId")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).CryptoKeyId = (string) content.GetValueForProperty("CryptoKeyId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).CryptoKeyId, global::System.Convert.ToString); @@ -233,9 +241,9 @@ internal CryptoKeyResource(global::System.Management.Automation.PSObject content { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).KeyType = (string) content.GetValueForProperty("KeyType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).KeyType, global::System.Convert.ToString); } - if (content.Contains("KeySize")) + if (content.Contains("CryptoKeySize")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).KeySize = (long?) content.GetValueForProperty("KeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).KeySize, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).CryptoKeySize = (long?) content.GetValueForProperty("CryptoKeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).CryptoKeySize, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("KeyAlgorithm")) { @@ -253,14 +261,14 @@ internal CryptoKeyResource(global::System.Management.Automation.PSObject content { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).IsShortKeySize = (bool?) content.GetValueForProperty("IsShortKeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).IsShortKeySize, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("PairedKeyId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).PairedKeyId = (string) content.GetValueForProperty("PairedKeyId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).PairedKeyId, global::System.Convert.ToString); - } if (content.Contains("PairedKeyType")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).PairedKeyType = (string) content.GetValueForProperty("PairedKeyType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).PairedKeyType, global::System.Convert.ToString); } + if (content.Contains("PairedKeyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).PairedKeyId = (string) content.GetValueForProperty("PairedKeyId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal)this).PairedKeyId, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } @@ -314,7 +322,7 @@ public override string ToString() return ToJsonString(); } } - /// Crypto key resource + /// The object representing a firmware analysis crypto key resource [System.ComponentModel.TypeConverter(typeof(CryptoKeyResourceTypeConverter))] public partial interface ICryptoKeyResource diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResource.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResource.cs index b7878b369203..fcc10be27c2f 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResource.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResource.cs @@ -7,21 +7,26 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// Crypto key resource + /// The object representing a firmware analysis crypto key resource public partial class CryptoKeyResource : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResource, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource(); /// ID for the key result. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string CryptoKeyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).Id = value ?? null; } + /// Size of the key in bits. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public long? CryptoKeySize { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).Size; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).Size = value ?? default(long); } + /// List of files where this key was found. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public System.Collections.Generic.List FilePath { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).FilePath; } @@ -30,9 +35,11 @@ public partial class CryptoKeyResource : /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id; } - /// Indicates the key size is considered too small to be secure for the algorithm. + /// + /// Indicates the key size is considered too small to be secure for the algorithm according to NIST guidance. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public bool? IsShortKeySize { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).IsShortKeySize; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).IsShortKeySize = value ?? default(bool); } @@ -40,38 +47,55 @@ public partial class CryptoKeyResource : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string KeyAlgorithm { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).KeyAlgorithm; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).KeyAlgorithm = value ?? null; } - /// Size of the key in bits. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public long? KeySize { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).KeySize; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).KeySize = value ?? default(long); } - /// Type of the key (public or private). [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string KeyType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).KeyType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).KeyType = value ?? null; } /// Internal Acessors for FilePath - System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal.FilePath { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).FilePath; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).FilePath = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal.FilePath { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).FilePath; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).FilePath = value ?? null /* arrayOf */; } /// Internal Acessors for PairedKey - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKey Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal.PairedKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).PairedKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).PairedKey = value; } + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKey Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal.PairedKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).PairedKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).PairedKey = value ?? null /* model class */; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKey Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoKey()); set { {_property = value;} } } + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).ProvisioningState = value ?? null; } + /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name = value ?? null; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type = value ?? null; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name; } /// ID of the paired key or certificate. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] @@ -84,45 +108,49 @@ public partial class CryptoKeyResource : /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKey _property; - /// The properties of a crypto key found within a firmware image + /// The resource-specific properties for this resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKey Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoKey()); set => this._property = value; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyInternal)Property).ProvisioningState; } + /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; } + internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type; } /// Functions the key can fulfill. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] @@ -142,14 +170,14 @@ public CryptoKeyResource() /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); } } - /// Crypto key resource + /// The object representing a firmware analysis crypto key resource public partial interface ICryptoKeyResource : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResource + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource { /// ID for the key result. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( @@ -162,6 +190,17 @@ public partial interface ICryptoKeyResource : SerializedName = @"cryptoKeyId", PossibleTypes = new [] { typeof(string) })] string CryptoKeyId { get; set; } + /// Size of the key in bits. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Size of the key in bits.", + SerializedName = @"cryptoKeySize", + PossibleTypes = new [] { typeof(long) })] + long? CryptoKeySize { get; set; } /// List of files where this key was found. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -173,14 +212,16 @@ public partial interface ICryptoKeyResource : SerializedName = @"filePaths", PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List FilePath { get; } - /// Indicates the key size is considered too small to be secure for the algorithm. + /// + /// Indicates the key size is considered too small to be secure for the algorithm according to NIST guidance. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Indicates the key size is considered too small to be secure for the algorithm.", + Description = @"Indicates the key size is considered too small to be secure for the algorithm according to NIST guidance.", SerializedName = @"isShortKeySize", PossibleTypes = new [] { typeof(bool) })] bool? IsShortKeySize { get; set; } @@ -195,17 +236,6 @@ public partial interface ICryptoKeyResource : SerializedName = @"keyAlgorithm", PossibleTypes = new [] { typeof(string) })] string KeyAlgorithm { get; set; } - /// Size of the key in bits. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"Size of the key in bits.", - SerializedName = @"keySize", - PossibleTypes = new [] { typeof(long) })] - long? KeySize { get; set; } /// Type of the key (public or private). [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -216,6 +246,7 @@ public partial interface ICryptoKeyResource : Description = @"Type of the key (public or private).", SerializedName = @"keyType", PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Public", "Private")] string KeyType { get; set; } /// ID of the paired key or certificate. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( @@ -225,7 +256,7 @@ public partial interface ICryptoKeyResource : Create = true, Update = true, Description = @"ID of the paired key or certificate.", - SerializedName = @"id", + SerializedName = @"pairedKeyId", PossibleTypes = new [] { typeof(string) })] string PairedKeyId { get; set; } /// The type indicating whether the paired object is a key or certificate. @@ -239,6 +270,18 @@ public partial interface ICryptoKeyResource : SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] string PairedKeyType { get; set; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; } /// Functions the key can fulfill. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -252,21 +295,24 @@ public partial interface ICryptoKeyResource : System.Collections.Generic.List Usage { get; set; } } - /// Crypto key resource + /// The object representing a firmware analysis crypto key resource internal partial interface ICryptoKeyResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResourceInternal { /// ID for the key result. string CryptoKeyId { get; set; } + /// Size of the key in bits. + long? CryptoKeySize { get; set; } /// List of files where this key was found. System.Collections.Generic.List FilePath { get; set; } - /// Indicates the key size is considered too small to be secure for the algorithm. + /// + /// Indicates the key size is considered too small to be secure for the algorithm according to NIST guidance. + /// bool? IsShortKeySize { get; set; } /// Key algorithm name. string KeyAlgorithm { get; set; } - /// Size of the key in bits. - long? KeySize { get; set; } /// Type of the key (public or private). + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Public", "Private")] string KeyType { get; set; } /// A matching paired key or certificate. Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPairedKey PairedKey { get; set; } @@ -274,8 +320,11 @@ internal partial interface ICryptoKeyResourceInternal : string PairedKeyId { get; set; } /// The type indicating whether the paired object is a key or certificate. string PairedKeyType { get; set; } - /// The properties of a crypto key found within a firmware image + /// The resource-specific properties for this resource. Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKey Property { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; set; } /// Functions the key can fulfill. System.Collections.Generic.List Usage { get; set; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResource.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResource.json.cs index eaf012529521..27bfc0fbb737 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResource.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResource.json.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// Crypto key resource + /// The object representing a firmware analysis crypto key resource public partial class CryptoKeyResource { @@ -65,7 +65,7 @@ internal CryptoKeyResource(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.R { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Resource(json); + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource(json); {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoKey.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateListResult.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResourceListResult.PowerShell.cs similarity index 73% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateListResult.PowerShell.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResourceListResult.PowerShell.cs index 66ab18b9a41c..a25fb99dbcbe 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateListResult.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResourceListResult.PowerShell.cs @@ -7,9 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; - /// List of crypto certificates. - [System.ComponentModel.TypeConverter(typeof(CryptoCertificateListResultTypeConverter))] - public partial class CryptoCertificateListResult + /// The response of a CryptoKeyResource list operation. + [System.ComponentModel.TypeConverter(typeof(CryptoKeyResourceListResultTypeConverter))] + public partial class CryptoKeyResourceListResult { /// @@ -63,11 +63,11 @@ public partial class CryptoCertificateListResult 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. - internal CryptoCertificateListResult(global::System.Collections.IDictionary content) + internal CryptoKeyResourceListResult(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -78,21 +78,21 @@ internal CryptoCertificateListResult(global::System.Collections.IDictionary cont // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificateResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoKeyResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResultInternal)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. - internal CryptoCertificateListResult(global::System.Management.Automation.PSObject content) + internal CryptoKeyResourceListResult(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -103,47 +103,47 @@ internal CryptoCertificateListResult(global::System.Management.Automation.PSObje // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoCertificateResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoKeyResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResultInternal)this).NextLink, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new CryptoCertificateListResult(content); + return new CryptoKeyResourceListResult(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.FirmwareAnalysis.Models.ICryptoCertificateListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new CryptoCertificateListResult(content); + return new CryptoKeyResourceListResult(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// 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.FirmwareAnalysis.Models.ICryptoCertificateListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -162,9 +162,9 @@ public override string ToString() return ToJsonString(); } } - /// List of crypto certificates. - [System.ComponentModel.TypeConverter(typeof(CryptoCertificateListResultTypeConverter))] - public partial interface ICryptoCertificateListResult + /// The response of a CryptoKeyResource list operation. + [System.ComponentModel.TypeConverter(typeof(CryptoKeyResourceListResultTypeConverter))] + public partial interface ICryptoKeyResourceListResult { diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateListResult.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResourceListResult.TypeConverter.cs similarity index 88% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateListResult.TypeConverter.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResourceListResult.TypeConverter.cs index 63da566cf4bc..215e20da4a49 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoCertificateListResult.TypeConverter.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResourceListResult.TypeConverter.cs @@ -8,9 +8,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class CryptoCertificateListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class CryptoKeyResourceListResultTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class CryptoCertificateListResultTypeConverter : global::System.M public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -95,31 +95,31 @@ public static bool CanConvertFrom(dynamic sourceValue) /// 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. + /// 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 + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResult).IsAssignableFrom(type)) { return sourceValue; } try { - return CryptoCertificateListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return CryptoKeyResourceListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICrypto } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return CryptoCertificateListResult.DeserializeFromPSObject(sourceValue); + return CryptoKeyResourceListResult.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return CryptoCertificateListResult.DeserializeFromDictionary(sourceValue); + return CryptoKeyResourceListResult.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyListResult.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResourceListResult.cs similarity index 62% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyListResult.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResourceListResult.cs index 71a94dc4370b..71f14a1bbe51 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyListResult.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResourceListResult.cs @@ -7,70 +7,67 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// List of crypto keys. - public partial class CryptoKeyListResult : - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyListResult, - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyListResultInternal + /// The response of a CryptoKeyResource list operation. + public partial class CryptoKeyResourceListResult : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResult, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResultInternal { - /// Internal Acessors for Value - System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyListResultInternal.Value { get => this._value; set { {_value = value;} } } - /// Backing field for property. private string _nextLink; - /// The uri to fetch the next page of resources. + /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. private System.Collections.Generic.List _value; - /// The list of crypto key results. + /// The CryptoKeyResource items on this page [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public System.Collections.Generic.List Value { get => this._value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } - /// Creates an new instance. - public CryptoKeyListResult() + /// Creates an new instance. + public CryptoKeyResourceListResult() { } } - /// List of crypto keys. - public partial interface ICryptoKeyListResult : + /// The response of a CryptoKeyResource list operation. + public partial interface ICryptoKeyResourceListResult : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable { - /// The uri to fetch the next page of resources. + /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The uri to fetch the next page of resources.", + Description = @"The link to the next page of items", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] string NextLink { get; set; } - /// The list of crypto key results. + /// The CryptoKeyResource items on this page [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = true, + Required = true, + ReadOnly = false, Read = true, - Create = false, - Update = false, - Description = @"The list of crypto key results.", + Create = true, + Update = true, + Description = @"The CryptoKeyResource items on this page", SerializedName = @"value", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResource) })] - System.Collections.Generic.List Value { get; } + System.Collections.Generic.List Value { get; set; } } - /// List of crypto keys. - internal partial interface ICryptoKeyListResultInternal + /// The response of a CryptoKeyResource list operation. + internal partial interface ICryptoKeyResourceListResultInternal { - /// The uri to fetch the next page of resources. + /// The link to the next page of items string NextLink { get; set; } - /// The list of crypto key results. + /// The CryptoKeyResource items on this page System.Collections.Generic.List Value { get; set; } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyListResult.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResourceListResult.json.cs similarity index 83% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyListResult.json.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResourceListResult.json.cs index b0f419bf39b4..57e1839d2773 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyListResult.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyResourceListResult.json.cs @@ -7,8 +7,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// List of crypto keys. - public partial class CryptoKeyListResult + /// The response of a CryptoKeyResource list operation. + public partial class CryptoKeyResourceListResult { /// @@ -54,10 +54,10 @@ public partial class CryptoKeyListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject instance to deserialize from. - internal CryptoKeyListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) + internal CryptoKeyResourceListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -71,25 +71,25 @@ internal CryptoKeyListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new CryptoKeyListResult(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new CryptoKeyResourceListResult(json) : null; } /// - /// Serializes this instance of into a . + /// 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 . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode) { @@ -101,17 +101,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) + if (null != this._value) { - if (null != this._value) + var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); - foreach( var __x in this._value ) - { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); - } - container.Add("value",__w); + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); } + container.Add("value",__w); } AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); AfterToJson(ref container); diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeySummaryResource.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeySummaryResource.PowerShell.cs index 83dc1e787d49..4db329579ea1 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeySummaryResource.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeySummaryResource.PowerShell.cs @@ -76,30 +76,34 @@ internal CryptoKeySummaryResource(global::System.Collections.IDictionary content return; } // actually deserialize - if (content.Contains("TotalKey")) + if (content.Contains("TotalKeyCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).TotalKey = (long?) content.GetValueForProperty("TotalKey",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).TotalKey, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).TotalKeyCount = (long?) content.GetValueForProperty("TotalKeyCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).TotalKeyCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("PublicKey")) + if (content.Contains("PublicKeyCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PublicKey = (long?) content.GetValueForProperty("PublicKey",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PublicKey, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PublicKeyCount = (long?) content.GetValueForProperty("PublicKeyCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PublicKeyCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("PrivateKey")) + if (content.Contains("PrivateKeyCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PrivateKey = (long?) content.GetValueForProperty("PrivateKey",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PrivateKey, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PrivateKeyCount = (long?) content.GetValueForProperty("PrivateKeyCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PrivateKeyCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("PairedKey")) + if (content.Contains("PairedKeyCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PairedKey = (long?) content.GetValueForProperty("PairedKey",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PairedKey, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PairedKeyCount = (long?) content.GetValueForProperty("PairedKeyCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PairedKeyCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("ShortKeySize")) + if (content.Contains("ShortKeySizeCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).ShortKeySize = (long?) content.GetValueForProperty("ShortKeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).ShortKeySize, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).ShortKeySizeCount = (long?) content.GetValueForProperty("ShortKeySizeCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).ShortKeySizeCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SummaryType")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType = (string) content.GetValueForProperty("SummaryType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -117,30 +121,34 @@ internal CryptoKeySummaryResource(global::System.Management.Automation.PSObject return; } // actually deserialize - if (content.Contains("TotalKey")) + if (content.Contains("TotalKeyCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).TotalKey = (long?) content.GetValueForProperty("TotalKey",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).TotalKey, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).TotalKeyCount = (long?) content.GetValueForProperty("TotalKeyCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).TotalKeyCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("PublicKey")) + if (content.Contains("PublicKeyCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PublicKey = (long?) content.GetValueForProperty("PublicKey",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PublicKey, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PublicKeyCount = (long?) content.GetValueForProperty("PublicKeyCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PublicKeyCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("PrivateKey")) + if (content.Contains("PrivateKeyCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PrivateKey = (long?) content.GetValueForProperty("PrivateKey",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PrivateKey, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PrivateKeyCount = (long?) content.GetValueForProperty("PrivateKeyCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PrivateKeyCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("PairedKey")) + if (content.Contains("PairedKeyCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PairedKey = (long?) content.GetValueForProperty("PairedKey",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PairedKey, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PairedKeyCount = (long?) content.GetValueForProperty("PairedKeyCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).PairedKeyCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("ShortKeySize")) + if (content.Contains("ShortKeySizeCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).ShortKeySize = (long?) content.GetValueForProperty("ShortKeySize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).ShortKeySize, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).ShortKeySizeCount = (long?) content.GetValueForProperty("ShortKeySizeCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeySummaryResourceInternal)this).ShortKeySizeCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SummaryType")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType = (string) content.GetValueForProperty("SummaryType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeySummaryResource.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeySummaryResource.cs index a54fae1b11b5..1cb95acf7217 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeySummaryResource.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeySummaryResource.cs @@ -19,45 +19,52 @@ public partial class CryptoKeySummaryResource : /// private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceProperties __summaryResourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceProperties(); - /// Backing field for property. - private long? _pairedKey; + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).ProvisioningState = value ?? null; } + + /// Backing field for property. + private long? _pairedKeyCount; /// Total number of keys found that have a matching paired key or certificate. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public long? PairedKey { get => this._pairedKey; set => this._pairedKey = value; } + public long? PairedKeyCount { get => this._pairedKeyCount; set => this._pairedKeyCount = value; } - /// Backing field for property. - private long? _privateKey; + /// Backing field for property. + private long? _privateKeyCount; /// Total number of private keys found. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public long? PrivateKey { get => this._privateKey; set => this._privateKey = value; } + public long? PrivateKeyCount { get => this._privateKeyCount; set => this._privateKeyCount = value; } + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).ProvisioningState; } - /// Backing field for property. - private long? _publicKey; + /// Backing field for property. + private long? _publicKeyCount; /// Total number of (non-certificate) public keys found. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public long? PublicKey { get => this._publicKey; set => this._publicKey = value; } + public long? PublicKeyCount { get => this._publicKeyCount; set => this._publicKeyCount = value; } - /// Backing field for property. - private long? _shortKeySize; + /// Backing field for property. + private long? _shortKeySizeCount; /// Total number of keys found that have an insecure key size for the algorithm. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public long? ShortKeySize { get => this._shortKeySize; set => this._shortKeySize = value; } + public long? ShortKeySizeCount { get => this._shortKeySizeCount; set => this._shortKeySizeCount = value; } - /// Describes the type of summary. + /// The type of summary. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Constant] [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] public string SummaryType { get => "CryptoKey"; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).SummaryType = "CryptoKey"; } - /// Backing field for property. - private long? _totalKey; + /// Backing field for property. + private long? _totalKeyCount; /// Total number of cryptographic keys found. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public long? TotalKey { get => this._totalKey; set => this._totalKey = value; } + public long? TotalKeyCount { get => this._totalKeyCount; set => this._totalKeyCount = value; } /// Creates an new instance. public CryptoKeySummaryResource() @@ -90,9 +97,9 @@ public partial interface ICryptoKeySummaryResource : Create = true, Update = true, Description = @"Total number of keys found that have a matching paired key or certificate.", - SerializedName = @"pairedKeys", + SerializedName = @"pairedKeyCount", PossibleTypes = new [] { typeof(long) })] - long? PairedKey { get; set; } + long? PairedKeyCount { get; set; } /// Total number of private keys found. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -101,9 +108,9 @@ public partial interface ICryptoKeySummaryResource : Create = true, Update = true, Description = @"Total number of private keys found.", - SerializedName = @"privateKeys", + SerializedName = @"privateKeyCount", PossibleTypes = new [] { typeof(long) })] - long? PrivateKey { get; set; } + long? PrivateKeyCount { get; set; } /// Total number of (non-certificate) public keys found. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -112,9 +119,9 @@ public partial interface ICryptoKeySummaryResource : Create = true, Update = true, Description = @"Total number of (non-certificate) public keys found.", - SerializedName = @"publicKeys", + SerializedName = @"publicKeyCount", PossibleTypes = new [] { typeof(long) })] - long? PublicKey { get; set; } + long? PublicKeyCount { get; set; } /// Total number of keys found that have an insecure key size for the algorithm. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -123,9 +130,9 @@ public partial interface ICryptoKeySummaryResource : Create = true, Update = true, Description = @"Total number of keys found that have an insecure key size for the algorithm.", - SerializedName = @"shortKeySize", + SerializedName = @"shortKeySizeCount", PossibleTypes = new [] { typeof(long) })] - long? ShortKeySize { get; set; } + long? ShortKeySizeCount { get; set; } /// Total number of cryptographic keys found. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -134,9 +141,9 @@ public partial interface ICryptoKeySummaryResource : Create = true, Update = true, Description = @"Total number of cryptographic keys found.", - SerializedName = @"totalKeys", + SerializedName = @"totalKeyCount", PossibleTypes = new [] { typeof(long) })] - long? TotalKey { get; set; } + long? TotalKeyCount { get; set; } } /// Properties for cryptographic key summary. @@ -144,15 +151,15 @@ internal partial interface ICryptoKeySummaryResourceInternal : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal { /// Total number of keys found that have a matching paired key or certificate. - long? PairedKey { get; set; } + long? PairedKeyCount { get; set; } /// Total number of private keys found. - long? PrivateKey { get; set; } + long? PrivateKeyCount { get; set; } /// Total number of (non-certificate) public keys found. - long? PublicKey { get; set; } + long? PublicKeyCount { get; set; } /// Total number of keys found that have an insecure key size for the algorithm. - long? ShortKeySize { get; set; } + long? ShortKeySizeCount { get; set; } /// Total number of cryptographic keys found. - long? TotalKey { get; set; } + long? TotalKeyCount { get; set; } } } \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeySummaryResource.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeySummaryResource.json.cs index 7add6e57f755..4199dd69e56a 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeySummaryResource.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeySummaryResource.json.cs @@ -66,11 +66,11 @@ internal CryptoKeySummaryResource(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAna return; } __summaryResourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceProperties(json); - {_totalKey = If( json?.PropertyT("totalKeys"), out var __jsonTotalKeys) ? (long?)__jsonTotalKeys : _totalKey;} - {_publicKey = If( json?.PropertyT("publicKeys"), out var __jsonPublicKeys) ? (long?)__jsonPublicKeys : _publicKey;} - {_privateKey = If( json?.PropertyT("privateKeys"), out var __jsonPrivateKeys) ? (long?)__jsonPrivateKeys : _privateKey;} - {_pairedKey = If( json?.PropertyT("pairedKeys"), out var __jsonPairedKeys) ? (long?)__jsonPairedKeys : _pairedKey;} - {_shortKeySize = If( json?.PropertyT("shortKeySize"), out var __jsonShortKeySize) ? (long?)__jsonShortKeySize : _shortKeySize;} + {_totalKeyCount = If( json?.PropertyT("totalKeyCount"), out var __jsonTotalKeyCount) ? (long?)__jsonTotalKeyCount : _totalKeyCount;} + {_publicKeyCount = If( json?.PropertyT("publicKeyCount"), out var __jsonPublicKeyCount) ? (long?)__jsonPublicKeyCount : _publicKeyCount;} + {_privateKeyCount = If( json?.PropertyT("privateKeyCount"), out var __jsonPrivateKeyCount) ? (long?)__jsonPrivateKeyCount : _privateKeyCount;} + {_pairedKeyCount = If( json?.PropertyT("pairedKeyCount"), out var __jsonPairedKeyCount) ? (long?)__jsonPairedKeyCount : _pairedKeyCount;} + {_shortKeySizeCount = If( json?.PropertyT("shortKeySizeCount"), out var __jsonShortKeySizeCount) ? (long?)__jsonShortKeySizeCount : _shortKeySizeCount;} AfterFromJson(json); } @@ -106,11 +106,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode return container; } __summaryResourceProperties?.ToJson(container, serializationMode); - AddIf( null != this._totalKey ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._totalKey) : null, "totalKeys" ,container.Add ); - AddIf( null != this._publicKey ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._publicKey) : null, "publicKeys" ,container.Add ); - AddIf( null != this._privateKey ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._privateKey) : null, "privateKeys" ,container.Add ); - AddIf( null != this._pairedKey ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._pairedKey) : null, "pairedKeys" ,container.Add ); - AddIf( null != this._shortKeySize ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._shortKeySize) : null, "shortKeySize" ,container.Add ); + AddIf( null != this._totalKeyCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._totalKeyCount) : null, "totalKeyCount" ,container.Add ); + AddIf( null != this._publicKeyCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._publicKeyCount) : null, "publicKeyCount" ,container.Add ); + AddIf( null != this._privateKeyCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._privateKeyCount) : null, "privateKeyCount" ,container.Add ); + AddIf( null != this._pairedKeyCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._pairedKeyCount) : null, "pairedKeyCount" ,container.Add ); + AddIf( null != this._shortKeySizeCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._shortKeySizeCount) : null, "shortKeySizeCount" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveComponent.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveComponent.PowerShell.cs index 5216b2f73098..77ce4b210a22 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveComponent.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveComponent.PowerShell.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; - /// Properties of the SBOM component for a CVE. + /// Legacy component of a CVE result. [System.ComponentModel.TypeConverter(typeof(CveComponentTypeConverter))] public partial class CveComponent { @@ -170,7 +170,7 @@ public override string ToString() return ToJsonString(); } } - /// Properties of the SBOM component for a CVE. + /// Legacy component of a CVE result. [System.ComponentModel.TypeConverter(typeof(CveComponentTypeConverter))] public partial interface ICveComponent diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveComponent.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveComponent.cs index 1ae4f9811496..9259fd6b19cc 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveComponent.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveComponent.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// Properties of the SBOM component for a CVE. + /// Legacy component of a CVE result. public partial class CveComponent : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponent, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponentInternal @@ -16,14 +16,14 @@ public partial class CveComponent : /// Backing field for property. private string _componentId; - /// ID of the SBOM component + /// ID of the SBOM component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string ComponentId { get => this._componentId; set => this._componentId = value; } /// Backing field for property. private string _name; - /// Name of the SBOM component + /// Name of the SBOM component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string Name { get => this._name; set => this._name = value; } @@ -40,29 +40,29 @@ public CveComponent() } } - /// Properties of the SBOM component for a CVE. + /// Legacy component of a CVE result. public partial interface ICveComponent : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable { - /// ID of the SBOM component + /// ID of the SBOM component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"ID of the SBOM component", + Description = @"ID of the SBOM component.", SerializedName = @"componentId", PossibleTypes = new [] { typeof(string) })] string ComponentId { get; set; } - /// Name of the SBOM component + /// Name of the SBOM component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Name of the SBOM component", + Description = @"Name of the SBOM component.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] string Name { get; set; } @@ -79,13 +79,13 @@ public partial interface ICveComponent : string Version { get; set; } } - /// Properties of the SBOM component for a CVE. + /// Legacy component of a CVE result. internal partial interface ICveComponentInternal { - /// ID of the SBOM component + /// ID of the SBOM component. string ComponentId { get; set; } - /// Name of the SBOM component + /// Name of the SBOM component. string Name { get; set; } /// Version of the SBOM component. string Version { get; set; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveComponent.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveComponent.json.cs index 4edf5cdcb544..cf678ab383bd 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveComponent.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveComponent.json.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// Properties of the SBOM component for a CVE. + /// Legacy component of a CVE result. public partial class CveComponent { diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResource.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResource.PowerShell.cs index e6ee075d529a..a3e358bec1d8 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResource.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResource.PowerShell.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; - /// CVE analysis result resource + /// The object representing a firmware analysis CVE result resource [System.ComponentModel.TypeConverter(typeof(CveResourceTypeConverter))] public partial class CveResource { @@ -120,6 +120,10 @@ internal CveResource(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } if (content.Contains("Component")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Component = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponent) content.GetValueForProperty("Component",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Component, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveComponentTypeConverter.ConvertFrom); @@ -128,22 +132,30 @@ internal CveResource(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CveId = (string) content.GetValueForProperty("CveId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CveId, global::System.Convert.ToString); } + if (content.Contains("PropertiesComponentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).PropertiesComponentId = (string) content.GetValueForProperty("PropertiesComponentId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).PropertiesComponentId, global::System.Convert.ToString); + } + if (content.Contains("ComponentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentName = (string) content.GetValueForProperty("ComponentName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentName, global::System.Convert.ToString); + } + if (content.Contains("ComponentVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentVersion = (string) content.GetValueForProperty("ComponentVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentVersion, global::System.Convert.ToString); + } if (content.Contains("Severity")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Severity = (string) content.GetValueForProperty("Severity",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Severity, global::System.Convert.ToString); } - if (content.Contains("PropertiesName")) + if (content.Contains("CveName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).PropertiesName = (string) content.GetValueForProperty("PropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).PropertiesName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CveName = (string) content.GetValueForProperty("CveName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CveName, global::System.Convert.ToString); } if (content.Contains("CvssScore")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssScore = (string) content.GetValueForProperty("CvssScore",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssScore, global::System.Convert.ToString); } - if (content.Contains("CvssVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssVersion = (string) content.GetValueForProperty("CvssVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssVersion, global::System.Convert.ToString); - } if (content.Contains("CvssV2Score")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssV2Score = (string) content.GetValueForProperty("CvssV2Score",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssV2Score, global::System.Convert.ToString); @@ -152,6 +164,22 @@ internal CveResource(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssV3Score = (string) content.GetValueForProperty("CvssV3Score",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssV3Score, global::System.Convert.ToString); } + if (content.Contains("CvssVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssVersion = (string) content.GetValueForProperty("CvssVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssVersion, global::System.Convert.ToString); + } + if (content.Contains("EffectiveCvssScore")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).EffectiveCvssScore = (float?) content.GetValueForProperty("EffectiveCvssScore",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).EffectiveCvssScore, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("EffectiveCvssVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).EffectiveCvssVersion = (int?) content.GetValueForProperty("EffectiveCvssVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).EffectiveCvssVersion, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CvssScores")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssScores = (System.Collections.Generic.List) content.GetValueForProperty("CvssScores",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssScores, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CvssScoreTypeConverter.ConvertFrom)); + } if (content.Contains("Link")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Link = (System.Collections.Generic.List) content.GetValueForProperty("Link",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Link, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveLinkTypeConverter.ConvertFrom)); @@ -160,17 +188,17 @@ internal CveResource(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Description, global::System.Convert.ToString); } - if (content.Contains("ComponentId")) + if (content.Contains("PropertiesComponentComponentId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentId = (string) content.GetValueForProperty("ComponentId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).PropertiesComponentComponentId = (string) content.GetValueForProperty("PropertiesComponentComponentId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).PropertiesComponentComponentId, global::System.Convert.ToString); } - if (content.Contains("ComponentName")) + if (content.Contains("PropertiesComponentName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentName = (string) content.GetValueForProperty("ComponentName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).PropertiesComponentName = (string) content.GetValueForProperty("PropertiesComponentName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).PropertiesComponentName, global::System.Convert.ToString); } - if (content.Contains("ComponentVersion")) + if (content.Contains("Version")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentVersion = (string) content.GetValueForProperty("ComponentVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Version, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } @@ -233,6 +261,10 @@ internal CveResource(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } if (content.Contains("Component")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Component = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponent) content.GetValueForProperty("Component",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Component, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveComponentTypeConverter.ConvertFrom); @@ -241,22 +273,30 @@ internal CveResource(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CveId = (string) content.GetValueForProperty("CveId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CveId, global::System.Convert.ToString); } + if (content.Contains("PropertiesComponentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).PropertiesComponentId = (string) content.GetValueForProperty("PropertiesComponentId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).PropertiesComponentId, global::System.Convert.ToString); + } + if (content.Contains("ComponentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentName = (string) content.GetValueForProperty("ComponentName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentName, global::System.Convert.ToString); + } + if (content.Contains("ComponentVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentVersion = (string) content.GetValueForProperty("ComponentVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentVersion, global::System.Convert.ToString); + } if (content.Contains("Severity")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Severity = (string) content.GetValueForProperty("Severity",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Severity, global::System.Convert.ToString); } - if (content.Contains("PropertiesName")) + if (content.Contains("CveName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).PropertiesName = (string) content.GetValueForProperty("PropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).PropertiesName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CveName = (string) content.GetValueForProperty("CveName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CveName, global::System.Convert.ToString); } if (content.Contains("CvssScore")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssScore = (string) content.GetValueForProperty("CvssScore",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssScore, global::System.Convert.ToString); } - if (content.Contains("CvssVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssVersion = (string) content.GetValueForProperty("CvssVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssVersion, global::System.Convert.ToString); - } if (content.Contains("CvssV2Score")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssV2Score = (string) content.GetValueForProperty("CvssV2Score",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssV2Score, global::System.Convert.ToString); @@ -265,6 +305,22 @@ internal CveResource(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssV3Score = (string) content.GetValueForProperty("CvssV3Score",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssV3Score, global::System.Convert.ToString); } + if (content.Contains("CvssVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssVersion = (string) content.GetValueForProperty("CvssVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssVersion, global::System.Convert.ToString); + } + if (content.Contains("EffectiveCvssScore")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).EffectiveCvssScore = (float?) content.GetValueForProperty("EffectiveCvssScore",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).EffectiveCvssScore, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("EffectiveCvssVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).EffectiveCvssVersion = (int?) content.GetValueForProperty("EffectiveCvssVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).EffectiveCvssVersion, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CvssScores")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssScores = (System.Collections.Generic.List) content.GetValueForProperty("CvssScores",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).CvssScores, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CvssScoreTypeConverter.ConvertFrom)); + } if (content.Contains("Link")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Link = (System.Collections.Generic.List) content.GetValueForProperty("Link",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Link, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveLinkTypeConverter.ConvertFrom)); @@ -273,17 +329,17 @@ internal CveResource(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Description, global::System.Convert.ToString); } - if (content.Contains("ComponentId")) + if (content.Contains("PropertiesComponentComponentId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentId = (string) content.GetValueForProperty("ComponentId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).PropertiesComponentComponentId = (string) content.GetValueForProperty("PropertiesComponentComponentId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).PropertiesComponentComponentId, global::System.Convert.ToString); } - if (content.Contains("ComponentName")) + if (content.Contains("PropertiesComponentName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentName = (string) content.GetValueForProperty("ComponentName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).PropertiesComponentName = (string) content.GetValueForProperty("PropertiesComponentName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).PropertiesComponentName, global::System.Convert.ToString); } - if (content.Contains("ComponentVersion")) + if (content.Contains("Version")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentVersion = (string) content.GetValueForProperty("ComponentVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).ComponentVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal)this).Version, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -338,7 +394,7 @@ public override string ToString() return ToJsonString(); } } - /// CVE analysis result resource + /// The object representing a firmware analysis CVE result resource [System.ComponentModel.TypeConverter(typeof(CveResourceTypeConverter))] public partial interface ICveResource diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResource.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResource.cs index cc1960b6e78a..20ff488050e4 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResource.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResource.cs @@ -7,26 +7,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// CVE analysis result resource + /// The object representing a firmware analysis CVE result resource public partial class CveResource : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResource, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource(); - /// ID of the SBOM component - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public string ComponentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).ComponentId; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).ComponentId = value ?? null; } - - /// Name of the SBOM component + /// Name of the affected SBOM component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string ComponentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).ComponentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).ComponentName = value ?? null; } - /// Version of the SBOM component. + /// Version of the affected SBOM component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string ComponentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).ComponentVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).ComponentVersion = value ?? null; } @@ -34,22 +31,29 @@ public partial class CveResource : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string CveId { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).CveId; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).CveId = value ?? null; } - /// - /// A single CVSS score to represent the CVE. If a V3 score is specified, then it will use the V3 score. Otherwise if the - /// V2 score is specified it will be the V2 score. - /// + /// Name of the CVE. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string CveName { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).CveName; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).CveName = value ?? null; } + + /// Legacy property for the effective CVE score. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string CvssScore { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).CvssScore; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).CvssScore = value ?? null; } - /// CVSS V2 score of the CVE. + /// All known CVSS scores for the CVE. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public System.Collections.Generic.List CvssScores { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).CvssScores; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).CvssScores = value ?? null /* arrayOf */; } + + /// Legacy property for the CVE CVSS version 2 score, if one existed. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string CvssV2Score { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).CvssV2Score; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).CvssV2Score = value ?? null; } - /// CVSS V3 score of the CVE. + /// Legacy property for the CVE CVSS version 3 score, if one existed. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string CvssV3Score { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).CvssV3Score; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).CvssV3Score = value ?? null; } - /// CVSS version of the CVE. + /// + /// Legacy property for the what CVSS version score was stored in the cvssScore property + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string CvssVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).CvssVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).CvssVersion = value ?? null; } @@ -57,52 +61,93 @@ public partial class CveResource : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).Description = value ?? null; } + /// The most recent CVSS score of the CVE. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public float? EffectiveCvssScore { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).EffectiveCvssScore; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).EffectiveCvssScore = value ?? default(float); } + + /// The version of the effectiveCvssScore property. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public int? EffectiveCvssVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).EffectiveCvssVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).EffectiveCvssVersion = value ?? default(int); } + /// /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id; } /// The list of reference links for the CVE. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public System.Collections.Generic.List Link { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).Link; } /// Internal Acessors for Component - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponent Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal.Component { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).Component; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).Component = value; } + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponent Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal.Component { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).Component; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).Component = value ?? null /* model class */; } /// Internal Acessors for Link - System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal.Link { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).Link; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).Link = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal.Link { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).Link; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).Link = value ?? null /* arrayOf */; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResult Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveResult()); set { {_property = value;} } } + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).ProvisioningState = value ?? null; } + /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name = value ?? null; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type = value ?? null; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name; } - /// Name of the CVE. + /// ID of the SBOM component. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string PropertiesComponentComponentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).ComponentComponentId; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).ComponentComponentId = value ?? null; } + + /// ID of the affected SBOM component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public string PropertiesName { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).Name = value ?? null; } + public string PropertiesComponentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).ComponentId; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).ComponentId = value ?? null; } + + /// Name of the SBOM component. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string PropertiesComponentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).Name = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResult _property; - /// The properties of a CVE result found within a firmware image + /// The resource-specific properties for this resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResult Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveResult()); set => this._property = value; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).ProvisioningState; } + /// Severity of the CVE. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string Severity { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).Severity; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).Severity = value ?? null; } @@ -111,37 +156,41 @@ public partial class CveResource : /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; } + internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type; } + + /// Version of the SBOM component. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)Property).Version = value ?? null; } /// Creates an new instance. public CveResource() @@ -157,103 +206,113 @@ public CveResource() /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); } } - /// CVE analysis result resource + /// The object representing a firmware analysis CVE result resource public partial interface ICveResource : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResource + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource { - /// ID of the SBOM component + /// Name of the affected SBOM component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"ID of the SBOM component", - SerializedName = @"componentId", + Description = @"Name of the affected SBOM component.", + SerializedName = @"componentName", PossibleTypes = new [] { typeof(string) })] - string ComponentId { get; set; } - /// Name of the SBOM component + string ComponentName { get; set; } + /// Version of the affected SBOM component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Name of the SBOM component", - SerializedName = @"name", + Description = @"Version of the affected SBOM component.", + SerializedName = @"componentVersion", PossibleTypes = new [] { typeof(string) })] - string ComponentName { get; set; } - /// Version of the SBOM component. + string ComponentVersion { get; set; } + /// ID of the CVE result. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Version of the SBOM component.", - SerializedName = @"version", + Description = @"ID of the CVE result.", + SerializedName = @"cveId", PossibleTypes = new [] { typeof(string) })] - string ComponentVersion { get; set; } - /// ID of the CVE result. + string CveId { get; set; } + /// Name of the CVE. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"ID of the CVE result.", - SerializedName = @"cveId", + Description = @"Name of the CVE.", + SerializedName = @"cveName", PossibleTypes = new [] { typeof(string) })] - string CveId { get; set; } - /// - /// A single CVSS score to represent the CVE. If a V3 score is specified, then it will use the V3 score. Otherwise if the - /// V2 score is specified it will be the V2 score. - /// + string CveName { get; set; } + /// Legacy property for the effective CVE score. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"A single CVSS score to represent the CVE. If a V3 score is specified, then it will use the V3 score. Otherwise if the V2 score is specified it will be the V2 score.", + Description = @"Legacy property for the effective CVE score.", SerializedName = @"cvssScore", PossibleTypes = new [] { typeof(string) })] string CvssScore { get; set; } - /// CVSS V2 score of the CVE. + /// All known CVSS scores for the CVE. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"CVSS V2 score of the CVE.", + Description = @"All known CVSS scores for the CVE.", + SerializedName = @"cvssScores", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScore) })] + System.Collections.Generic.List CvssScores { get; set; } + /// Legacy property for the CVE CVSS version 2 score, if one existed. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Legacy property for the CVE CVSS version 2 score, if one existed.", SerializedName = @"cvssV2Score", PossibleTypes = new [] { typeof(string) })] string CvssV2Score { get; set; } - /// CVSS V3 score of the CVE. + /// Legacy property for the CVE CVSS version 3 score, if one existed. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"CVSS V3 score of the CVE.", + Description = @"Legacy property for the CVE CVSS version 3 score, if one existed.", SerializedName = @"cvssV3Score", PossibleTypes = new [] { typeof(string) })] string CvssV3Score { get; set; } - /// CVSS version of the CVE. + /// + /// Legacy property for the what CVSS version score was stored in the cvssScore property + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"CVSS version of the CVE.", + Description = @"Legacy property for the what CVSS version score was stored in the cvssScore property", SerializedName = @"cvssVersion", PossibleTypes = new [] { typeof(string) })] string CvssVersion { get; set; } @@ -268,6 +327,28 @@ public partial interface ICveResource : SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] string Description { get; set; } + /// The most recent CVSS score of the CVE. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The most recent CVSS score of the CVE.", + SerializedName = @"effectiveCvssScore", + PossibleTypes = new [] { typeof(float) })] + float? EffectiveCvssScore { get; set; } + /// The version of the effectiveCvssScore property. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The version of the effectiveCvssScore property.", + SerializedName = @"effectiveCvssVersion", + PossibleTypes = new [] { typeof(int) })] + int? EffectiveCvssVersion { get; set; } /// The list of reference links for the CVE. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -279,17 +360,51 @@ public partial interface ICveResource : SerializedName = @"links", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveLink) })] System.Collections.Generic.List Link { get; } - /// Name of the CVE. + /// ID of the SBOM component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Name of the CVE.", + Description = @"ID of the SBOM component.", + SerializedName = @"componentId", + PossibleTypes = new [] { typeof(string) })] + string PropertiesComponentComponentId { get; set; } + /// ID of the affected SBOM component. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"ID of the affected SBOM component.", + SerializedName = @"componentId", + PossibleTypes = new [] { typeof(string) })] + string PropertiesComponentId { get; set; } + /// Name of the SBOM component. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of the SBOM component.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] - string PropertiesName { get; set; } + string PropertiesComponentName { get; set; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; } /// Severity of the CVE. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -301,43 +416,68 @@ public partial interface ICveResource : SerializedName = @"severity", PossibleTypes = new [] { typeof(string) })] string Severity { get; set; } + /// Version of the SBOM component. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Version of the SBOM component.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; set; } } - /// CVE analysis result resource + /// The object representing a firmware analysis CVE result resource internal partial interface ICveResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResourceInternal { - /// The SBOM component for the CVE. + /// Legacy property for what is now componentName Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponent Component { get; set; } - /// ID of the SBOM component - string ComponentId { get; set; } - /// Name of the SBOM component + /// Name of the affected SBOM component. string ComponentName { get; set; } - /// Version of the SBOM component. + /// Version of the affected SBOM component. string ComponentVersion { get; set; } /// ID of the CVE result. string CveId { get; set; } - /// - /// A single CVSS score to represent the CVE. If a V3 score is specified, then it will use the V3 score. Otherwise if the - /// V2 score is specified it will be the V2 score. - /// + /// Name of the CVE. + string CveName { get; set; } + /// Legacy property for the effective CVE score. string CvssScore { get; set; } - /// CVSS V2 score of the CVE. + /// All known CVSS scores for the CVE. + System.Collections.Generic.List CvssScores { get; set; } + /// Legacy property for the CVE CVSS version 2 score, if one existed. string CvssV2Score { get; set; } - /// CVSS V3 score of the CVE. + /// Legacy property for the CVE CVSS version 3 score, if one existed. string CvssV3Score { get; set; } - /// CVSS version of the CVE. + /// + /// Legacy property for the what CVSS version score was stored in the cvssScore property + /// string CvssVersion { get; set; } /// The CVE description. string Description { get; set; } + /// The most recent CVSS score of the CVE. + float? EffectiveCvssScore { get; set; } + /// The version of the effectiveCvssScore property. + int? EffectiveCvssVersion { get; set; } /// The list of reference links for the CVE. System.Collections.Generic.List Link { get; set; } - /// Name of the CVE. - string PropertiesName { get; set; } - /// The properties of a CVE result found within a firmware image + /// ID of the SBOM component. + string PropertiesComponentComponentId { get; set; } + /// ID of the affected SBOM component. + string PropertiesComponentId { get; set; } + /// Name of the SBOM component. + string PropertiesComponentName { get; set; } + /// The resource-specific properties for this resource. Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResult Property { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; set; } /// Severity of the CVE. string Severity { get; set; } + /// Version of the SBOM component. + string Version { get; set; } } } \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResource.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResource.json.cs index 57641f9cdeac..a7b3d57963da 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResource.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResource.json.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// CVE analysis result resource + /// The object representing a firmware analysis CVE result resource public partial class CveResource { @@ -65,7 +65,7 @@ internal CveResource(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Resource(json); + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource(json); {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveResult.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryListResult.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResourceListResult.PowerShell.cs similarity index 70% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryListResult.PowerShell.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResourceListResult.PowerShell.cs index 35661f313566..a94acddccdac 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryListResult.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResourceListResult.PowerShell.cs @@ -7,9 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; - /// List of analysis summaries. - [System.ComponentModel.TypeConverter(typeof(SummaryListResultTypeConverter))] - public partial class SummaryListResult + /// The response of a CveResource list operation. + [System.ComponentModel.TypeConverter(typeof(CveResourceListResultTypeConverter))] + public partial class CveResourceListResult { /// @@ -63,44 +63,11 @@ public partial class SummaryListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SummaryListResult(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.FirmwareAnalysis.Models.ISummaryListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SummaryListResult(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.FirmwareAnalysis.Models.ISummaryListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SummaryListResult(global::System.Collections.IDictionary content) + internal CveResourceListResult(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -111,21 +78,21 @@ internal SummaryListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceListResultInternal)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. - internal SummaryListResult(global::System.Management.Automation.PSObject content) + internal CveResourceListResult(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -136,15 +103,48 @@ internal SummaryListResult(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CveResourceListResult(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.FirmwareAnalysis.Models.ICveResourceListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CveResourceListResult(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.FirmwareAnalysis.Models.ICveResourceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(jsonText)); + /// Serializes this instance to a json string. /// a containing this model serialized to JSON text. @@ -162,9 +162,9 @@ public override string ToString() return ToJsonString(); } } - /// List of analysis summaries. - [System.ComponentModel.TypeConverter(typeof(SummaryListResultTypeConverter))] - public partial interface ISummaryListResult + /// The response of a CveResource list operation. + [System.ComponentModel.TypeConverter(typeof(CveResourceListResultTypeConverter))] + public partial interface ICveResourceListResult { diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResourceListResult.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResourceListResult.TypeConverter.cs new file mode 100644 index 000000000000..a8855defa293 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResourceListResult.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.FirmwareAnalysis.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CveResourceListResultTypeConverter : 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.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Models.ICveResourceListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CveResourceListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CveResourceListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CveResourceListResult.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/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveListResult.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResourceListResult.cs similarity index 62% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveListResult.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResourceListResult.cs index 559877235c2a..1b7bfae8c5cc 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveListResult.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResourceListResult.cs @@ -7,70 +7,67 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// List of CVE results. - public partial class CveListResult : - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveListResult, - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveListResultInternal + /// The response of a CveResource list operation. + public partial class CveResourceListResult : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceListResult, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceListResultInternal { - /// Internal Acessors for Value - System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveListResultInternal.Value { get => this._value; set { {_value = value;} } } - /// Backing field for property. private string _nextLink; - /// The uri to fetch the next page of resources. + /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. private System.Collections.Generic.List _value; - /// The list of CVE results. + /// The CveResource items on this page [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public System.Collections.Generic.List Value { get => this._value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } - /// Creates an new instance. - public CveListResult() + /// Creates an new instance. + public CveResourceListResult() { } } - /// List of CVE results. - public partial interface ICveListResult : + /// The response of a CveResource list operation. + public partial interface ICveResourceListResult : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable { - /// The uri to fetch the next page of resources. + /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The uri to fetch the next page of resources.", + Description = @"The link to the next page of items", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] string NextLink { get; set; } - /// The list of CVE results. + /// The CveResource items on this page [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = true, + Required = true, + ReadOnly = false, Read = true, - Create = false, - Update = false, - Description = @"The list of CVE results.", + Create = true, + Update = true, + Description = @"The CveResource items on this page", SerializedName = @"value", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResource) })] - System.Collections.Generic.List Value { get; } + System.Collections.Generic.List Value { get; set; } } - /// List of CVE results. - internal partial interface ICveListResultInternal + /// The response of a CveResource list operation. + internal partial interface ICveResourceListResultInternal { - /// The uri to fetch the next page of resources. + /// The link to the next page of items string NextLink { get; set; } - /// The list of CVE results. + /// The CveResource items on this page System.Collections.Generic.List Value { get; set; } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveListResult.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResourceListResult.json.cs similarity index 84% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveListResult.json.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResourceListResult.json.cs index bd89ffe346d9..c1bfbbe85517 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveListResult.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResourceListResult.json.cs @@ -7,8 +7,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// List of CVE results. - public partial class CveListResult + /// The response of a CveResource list operation. + public partial class CveResourceListResult { /// @@ -54,10 +54,10 @@ public partial class CveListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject instance to deserialize from. - internal CveListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) + internal CveResourceListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -71,25 +71,25 @@ internal CveListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runti } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new CveListResult(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new CveResourceListResult(json) : null; } /// - /// Serializes this instance of into a . + /// 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 . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode) { @@ -101,17 +101,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) + if (null != this._value) { - if (null != this._value) + var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); - foreach( var __x in this._value ) - { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); - } - container.Add("value",__w); + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); } + container.Add("value",__w); } AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); AfterToJson(ref container); diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResult.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResult.PowerShell.cs index c1bfd22d7434..fcf20f12d9df 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResult.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResult.PowerShell.cs @@ -84,22 +84,30 @@ internal CveResult(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CveId = (string) content.GetValueForProperty("CveId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CveId, global::System.Convert.ToString); } + if (content.Contains("ComponentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentId = (string) content.GetValueForProperty("ComponentId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentId, global::System.Convert.ToString); + } + if (content.Contains("ComponentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentName = (string) content.GetValueForProperty("ComponentName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentName, global::System.Convert.ToString); + } + if (content.Contains("ComponentVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentVersion = (string) content.GetValueForProperty("ComponentVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentVersion, global::System.Convert.ToString); + } if (content.Contains("Severity")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Severity = (string) content.GetValueForProperty("Severity",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Severity, global::System.Convert.ToString); } - if (content.Contains("Name")) + if (content.Contains("CveName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CveName = (string) content.GetValueForProperty("CveName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CveName, global::System.Convert.ToString); } if (content.Contains("CvssScore")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssScore = (string) content.GetValueForProperty("CvssScore",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssScore, global::System.Convert.ToString); } - if (content.Contains("CvssVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssVersion = (string) content.GetValueForProperty("CvssVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssVersion, global::System.Convert.ToString); - } if (content.Contains("CvssV2Score")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssV2Score = (string) content.GetValueForProperty("CvssV2Score",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssV2Score, global::System.Convert.ToString); @@ -108,6 +116,22 @@ internal CveResult(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssV3Score = (string) content.GetValueForProperty("CvssV3Score",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssV3Score, global::System.Convert.ToString); } + if (content.Contains("CvssVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssVersion = (string) content.GetValueForProperty("CvssVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssVersion, global::System.Convert.ToString); + } + if (content.Contains("EffectiveCvssScore")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).EffectiveCvssScore = (float?) content.GetValueForProperty("EffectiveCvssScore",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).EffectiveCvssScore, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("EffectiveCvssVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).EffectiveCvssVersion = (int?) content.GetValueForProperty("EffectiveCvssVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).EffectiveCvssVersion, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CvssScores")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssScores = (System.Collections.Generic.List) content.GetValueForProperty("CvssScores",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssScores, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CvssScoreTypeConverter.ConvertFrom)); + } if (content.Contains("Link")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Link = (System.Collections.Generic.List) content.GetValueForProperty("Link",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Link, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveLinkTypeConverter.ConvertFrom)); @@ -116,17 +140,21 @@ internal CveResult(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Description, global::System.Convert.ToString); } - if (content.Contains("ComponentId")) + if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentId = (string) content.GetValueForProperty("ComponentId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ProvisioningState, global::System.Convert.ToString); } - if (content.Contains("ComponentName")) + if (content.Contains("ComponentComponentId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentName = (string) content.GetValueForProperty("ComponentName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentComponentId = (string) content.GetValueForProperty("ComponentComponentId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentComponentId, global::System.Convert.ToString); } - if (content.Contains("ComponentVersion")) + if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentVersion = (string) content.GetValueForProperty("ComponentVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Version, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } @@ -153,22 +181,30 @@ internal CveResult(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CveId = (string) content.GetValueForProperty("CveId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CveId, global::System.Convert.ToString); } + if (content.Contains("ComponentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentId = (string) content.GetValueForProperty("ComponentId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentId, global::System.Convert.ToString); + } + if (content.Contains("ComponentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentName = (string) content.GetValueForProperty("ComponentName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentName, global::System.Convert.ToString); + } + if (content.Contains("ComponentVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentVersion = (string) content.GetValueForProperty("ComponentVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentVersion, global::System.Convert.ToString); + } if (content.Contains("Severity")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Severity = (string) content.GetValueForProperty("Severity",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Severity, global::System.Convert.ToString); } - if (content.Contains("Name")) + if (content.Contains("CveName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CveName = (string) content.GetValueForProperty("CveName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CveName, global::System.Convert.ToString); } if (content.Contains("CvssScore")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssScore = (string) content.GetValueForProperty("CvssScore",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssScore, global::System.Convert.ToString); } - if (content.Contains("CvssVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssVersion = (string) content.GetValueForProperty("CvssVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssVersion, global::System.Convert.ToString); - } if (content.Contains("CvssV2Score")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssV2Score = (string) content.GetValueForProperty("CvssV2Score",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssV2Score, global::System.Convert.ToString); @@ -177,6 +213,22 @@ internal CveResult(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssV3Score = (string) content.GetValueForProperty("CvssV3Score",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssV3Score, global::System.Convert.ToString); } + if (content.Contains("CvssVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssVersion = (string) content.GetValueForProperty("CvssVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssVersion, global::System.Convert.ToString); + } + if (content.Contains("EffectiveCvssScore")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).EffectiveCvssScore = (float?) content.GetValueForProperty("EffectiveCvssScore",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).EffectiveCvssScore, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("EffectiveCvssVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).EffectiveCvssVersion = (int?) content.GetValueForProperty("EffectiveCvssVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).EffectiveCvssVersion, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CvssScores")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssScores = (System.Collections.Generic.List) content.GetValueForProperty("CvssScores",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).CvssScores, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CvssScoreTypeConverter.ConvertFrom)); + } if (content.Contains("Link")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Link = (System.Collections.Generic.List) content.GetValueForProperty("Link",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Link, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveLinkTypeConverter.ConvertFrom)); @@ -185,17 +237,21 @@ internal CveResult(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Description, global::System.Convert.ToString); } - if (content.Contains("ComponentId")) + if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentId = (string) content.GetValueForProperty("ComponentId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ProvisioningState, global::System.Convert.ToString); } - if (content.Contains("ComponentName")) + if (content.Contains("ComponentComponentId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentName = (string) content.GetValueForProperty("ComponentName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentComponentId = (string) content.GetValueForProperty("ComponentComponentId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentComponentId, global::System.Convert.ToString); } - if (content.Contains("ComponentVersion")) + if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentVersion = (string) content.GetValueForProperty("ComponentVersion",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).ComponentVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal)this).Version, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResult.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResult.cs index 0588544f5d99..c79a6974fbee 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResult.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResult.cs @@ -16,21 +16,34 @@ public partial class CveResult : /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponent _component; - /// The SBOM component for the CVE. + /// Legacy property for what is now componentName [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponent Component { get => (this._component = this._component ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveComponent()); set => this._component = value; } - /// ID of the SBOM component + /// ID of the SBOM component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public string ComponentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponentInternal)Component).ComponentId; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponentInternal)Component).ComponentId = value ?? null; } + public string ComponentComponentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponentInternal)Component).ComponentId; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponentInternal)Component).ComponentId = value ?? null; } - /// Name of the SBOM component - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public string ComponentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponentInternal)Component).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponentInternal)Component).Name = value ?? null; } + /// Backing field for property. + private string _componentId; - /// Version of the SBOM component. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public string ComponentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponentInternal)Component).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponentInternal)Component).Version = value ?? null; } + /// ID of the affected SBOM component. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string ComponentId { get => this._componentId; set => this._componentId = value; } + + /// Backing field for property. + private string _componentName; + + /// Name of the affected SBOM component. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string ComponentName { get => this._componentName; set => this._componentName = value; } + + /// Backing field for property. + private string _componentVersion; + + /// Version of the affected SBOM component. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string ComponentVersion { get => this._componentVersion; set => this._componentVersion = value; } /// Backing field for property. private string _cveId; @@ -39,34 +52,47 @@ public partial class CveResult : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string CveId { get => this._cveId; set => this._cveId = value; } + /// Backing field for property. + private string _cveName; + + /// Name of the CVE. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string CveName { get => this._cveName; set => this._cveName = value; } + /// Backing field for property. private string _cvssScore; - /// - /// A single CVSS score to represent the CVE. If a V3 score is specified, then it will use the V3 score. Otherwise if the - /// V2 score is specified it will be the V2 score. - /// + /// Legacy property for the effective CVE score. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string CvssScore { get => this._cvssScore; set => this._cvssScore = value; } + /// Backing field for property. + private System.Collections.Generic.List _cvssScores; + + /// All known CVSS scores for the CVE. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public System.Collections.Generic.List CvssScores { get => this._cvssScores; set => this._cvssScores = value; } + /// Backing field for property. private string _cvssV2Score; - /// CVSS V2 score of the CVE. + /// Legacy property for the CVE CVSS version 2 score, if one existed. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string CvssV2Score { get => this._cvssV2Score; set => this._cvssV2Score = value; } /// Backing field for property. private string _cvssV3Score; - /// CVSS V3 score of the CVE. + /// Legacy property for the CVE CVSS version 3 score, if one existed. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string CvssV3Score { get => this._cvssV3Score; set => this._cvssV3Score = value; } /// Backing field for property. private string _cvssVersion; - /// CVSS version of the CVE. + /// + /// Legacy property for the what CVSS version score was stored in the cvssScore property + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string CvssVersion { get => this._cvssVersion; set => this._cvssVersion = value; } @@ -77,6 +103,20 @@ public partial class CveResult : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string Description { get => this._description; set => this._description = value; } + /// Backing field for property. + private float? _effectiveCvssScore; + + /// The most recent CVSS score of the CVE. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public float? EffectiveCvssScore { get => this._effectiveCvssScore; set => this._effectiveCvssScore = value; } + + /// Backing field for property. + private int? _effectiveCvssVersion; + + /// The version of the effectiveCvssScore property. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public int? EffectiveCvssVersion { get => this._effectiveCvssVersion; set => this._effectiveCvssVersion = value; } + /// Backing field for property. private System.Collections.Generic.List _link; @@ -90,12 +130,19 @@ public partial class CveResult : /// Internal Acessors for Link System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal.Link { get => this._link; set { {_link = value;} } } - /// Backing field for property. - private string _name; + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResultInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } - /// Name of the CVE. + /// Name of the SBOM component. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponentInternal)Component).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponentInternal)Component).Name = value ?? null; } + + /// Backing field for property. + private string _provisioningState; + + /// The status of the last operation. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public string Name { get => this._name; set => this._name = value; } + public string ProvisioningState { get => this._provisioningState; } /// Backing field for property. private string _severity; @@ -104,6 +151,10 @@ public partial class CveResult : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string Severity { get => this._severity; set => this._severity = value; } + /// Version of the SBOM component. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponentInternal)Component).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponentInternal)Component).Version = value ?? null; } + /// Creates an new instance. public CveResult() { @@ -114,37 +165,48 @@ public CveResult() public partial interface ICveResult : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable { - /// ID of the SBOM component + /// ID of the SBOM component. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"ID of the SBOM component.", + SerializedName = @"componentId", + PossibleTypes = new [] { typeof(string) })] + string ComponentComponentId { get; set; } + /// ID of the affected SBOM component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"ID of the SBOM component", + Description = @"ID of the affected SBOM component.", SerializedName = @"componentId", PossibleTypes = new [] { typeof(string) })] string ComponentId { get; set; } - /// Name of the SBOM component + /// Name of the affected SBOM component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Name of the SBOM component", - SerializedName = @"name", + Description = @"Name of the affected SBOM component.", + SerializedName = @"componentName", PossibleTypes = new [] { typeof(string) })] string ComponentName { get; set; } - /// Version of the SBOM component. + /// Version of the affected SBOM component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Version of the SBOM component.", - SerializedName = @"version", + Description = @"Version of the affected SBOM component.", + SerializedName = @"componentVersion", PossibleTypes = new [] { typeof(string) })] string ComponentVersion { get; set; } /// ID of the CVE result. @@ -158,50 +220,71 @@ public partial interface ICveResult : SerializedName = @"cveId", PossibleTypes = new [] { typeof(string) })] string CveId { get; set; } - /// - /// A single CVSS score to represent the CVE. If a V3 score is specified, then it will use the V3 score. Otherwise if the - /// V2 score is specified it will be the V2 score. - /// + /// Name of the CVE. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of the CVE.", + SerializedName = @"cveName", + PossibleTypes = new [] { typeof(string) })] + string CveName { get; set; } + /// Legacy property for the effective CVE score. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"A single CVSS score to represent the CVE. If a V3 score is specified, then it will use the V3 score. Otherwise if the V2 score is specified it will be the V2 score.", + Description = @"Legacy property for the effective CVE score.", SerializedName = @"cvssScore", PossibleTypes = new [] { typeof(string) })] string CvssScore { get; set; } - /// CVSS V2 score of the CVE. + /// All known CVSS scores for the CVE. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"CVSS V2 score of the CVE.", + Description = @"All known CVSS scores for the CVE.", + SerializedName = @"cvssScores", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScore) })] + System.Collections.Generic.List CvssScores { get; set; } + /// Legacy property for the CVE CVSS version 2 score, if one existed. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Legacy property for the CVE CVSS version 2 score, if one existed.", SerializedName = @"cvssV2Score", PossibleTypes = new [] { typeof(string) })] string CvssV2Score { get; set; } - /// CVSS V3 score of the CVE. + /// Legacy property for the CVE CVSS version 3 score, if one existed. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"CVSS V3 score of the CVE.", + Description = @"Legacy property for the CVE CVSS version 3 score, if one existed.", SerializedName = @"cvssV3Score", PossibleTypes = new [] { typeof(string) })] string CvssV3Score { get; set; } - /// CVSS version of the CVE. + /// + /// Legacy property for the what CVSS version score was stored in the cvssScore property + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"CVSS version of the CVE.", + Description = @"Legacy property for the what CVSS version score was stored in the cvssScore property", SerializedName = @"cvssVersion", PossibleTypes = new [] { typeof(string) })] string CvssVersion { get; set; } @@ -216,6 +299,28 @@ public partial interface ICveResult : SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] string Description { get; set; } + /// The most recent CVSS score of the CVE. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The most recent CVSS score of the CVE.", + SerializedName = @"effectiveCvssScore", + PossibleTypes = new [] { typeof(float) })] + float? EffectiveCvssScore { get; set; } + /// The version of the effectiveCvssScore property. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The version of the effectiveCvssScore property.", + SerializedName = @"effectiveCvssVersion", + PossibleTypes = new [] { typeof(int) })] + int? EffectiveCvssVersion { get; set; } /// The list of reference links for the CVE. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -227,17 +332,29 @@ public partial interface ICveResult : SerializedName = @"links", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveLink) })] System.Collections.Generic.List Link { get; } - /// Name of the CVE. + /// Name of the SBOM component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Name of the CVE.", + Description = @"Name of the SBOM component.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] string Name { get; set; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; } /// Severity of the CVE. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -249,41 +366,66 @@ public partial interface ICveResult : SerializedName = @"severity", PossibleTypes = new [] { typeof(string) })] string Severity { get; set; } + /// Version of the SBOM component. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Version of the SBOM component.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; set; } } /// Details of a CVE detected in firmware. internal partial interface ICveResultInternal { - /// The SBOM component for the CVE. + /// Legacy property for what is now componentName Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveComponent Component { get; set; } - /// ID of the SBOM component + /// ID of the SBOM component. + string ComponentComponentId { get; set; } + /// ID of the affected SBOM component. string ComponentId { get; set; } - /// Name of the SBOM component + /// Name of the affected SBOM component. string ComponentName { get; set; } - /// Version of the SBOM component. + /// Version of the affected SBOM component. string ComponentVersion { get; set; } /// ID of the CVE result. string CveId { get; set; } - /// - /// A single CVSS score to represent the CVE. If a V3 score is specified, then it will use the V3 score. Otherwise if the - /// V2 score is specified it will be the V2 score. - /// + /// Name of the CVE. + string CveName { get; set; } + /// Legacy property for the effective CVE score. string CvssScore { get; set; } - /// CVSS V2 score of the CVE. + /// All known CVSS scores for the CVE. + System.Collections.Generic.List CvssScores { get; set; } + /// Legacy property for the CVE CVSS version 2 score, if one existed. string CvssV2Score { get; set; } - /// CVSS V3 score of the CVE. + /// Legacy property for the CVE CVSS version 3 score, if one existed. string CvssV3Score { get; set; } - /// CVSS version of the CVE. + /// + /// Legacy property for the what CVSS version score was stored in the cvssScore property + /// string CvssVersion { get; set; } /// The CVE description. string Description { get; set; } + /// The most recent CVSS score of the CVE. + float? EffectiveCvssScore { get; set; } + /// The version of the effectiveCvssScore property. + int? EffectiveCvssVersion { get; set; } /// The list of reference links for the CVE. System.Collections.Generic.List Link { get; set; } - /// Name of the CVE. + /// Name of the SBOM component. string Name { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; set; } /// Severity of the CVE. string Severity { get; set; } + /// Version of the SBOM component. + string Version { get; set; } } } \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResult.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResult.json.cs index dad3ea425b7d..b7874a914ada 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResult.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveResult.json.cs @@ -67,14 +67,21 @@ internal CveResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.J } {_component = If( json?.PropertyT("component"), out var __jsonComponent) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveComponent.FromJson(__jsonComponent) : _component;} {_cveId = If( json?.PropertyT("cveId"), out var __jsonCveId) ? (string)__jsonCveId : (string)_cveId;} + {_componentId = If( json?.PropertyT("componentId"), out var __jsonComponentId) ? (string)__jsonComponentId : (string)_componentId;} + {_componentName = If( json?.PropertyT("componentName"), out var __jsonComponentName) ? (string)__jsonComponentName : (string)_componentName;} + {_componentVersion = If( json?.PropertyT("componentVersion"), out var __jsonComponentVersion) ? (string)__jsonComponentVersion : (string)_componentVersion;} {_severity = If( json?.PropertyT("severity"), out var __jsonSeverity) ? (string)__jsonSeverity : (string)_severity;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_cveName = If( json?.PropertyT("cveName"), out var __jsonCveName) ? (string)__jsonCveName : (string)_cveName;} {_cvssScore = If( json?.PropertyT("cvssScore"), out var __jsonCvssScore) ? (string)__jsonCvssScore : (string)_cvssScore;} - {_cvssVersion = If( json?.PropertyT("cvssVersion"), out var __jsonCvssVersion) ? (string)__jsonCvssVersion : (string)_cvssVersion;} {_cvssV2Score = If( json?.PropertyT("cvssV2Score"), out var __jsonCvssV2Score) ? (string)__jsonCvssV2Score : (string)_cvssV2Score;} {_cvssV3Score = If( json?.PropertyT("cvssV3Score"), out var __jsonCvssV3Score) ? (string)__jsonCvssV3Score : (string)_cvssV3Score;} - {_link = If( json?.PropertyT("links"), out var __jsonLinks) ? If( __jsonLinks as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveLink) (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveLink.FromJson(__u) )) ))() : null : _link;} + {_cvssVersion = If( json?.PropertyT("cvssVersion"), out var __jsonCvssVersion) ? (string)__jsonCvssVersion : (string)_cvssVersion;} + {_effectiveCvssScore = If( json?.PropertyT("effectiveCvssScore"), out var __jsonEffectiveCvssScore) ? (float?)__jsonEffectiveCvssScore : _effectiveCvssScore;} + {_effectiveCvssVersion = If( json?.PropertyT("effectiveCvssVersion"), out var __jsonEffectiveCvssVersion) ? (int?)__jsonEffectiveCvssVersion : _effectiveCvssVersion;} + {_cvssScores = If( json?.PropertyT("cvssScores"), out var __jsonCvssScores) ? If( __jsonCvssScores as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScore) (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CvssScore.FromJson(__u) )) ))() : null : _cvssScores;} + {_link = If( json?.PropertyT("links"), out var __jsonLinks) ? If( __jsonLinks as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveLink) (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveLink.FromJson(__p) )) ))() : null : _link;} {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} AfterFromJson(json); } @@ -111,25 +118,43 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode } AddIf( null != this._component ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._component.ToJson(null,serializationMode) : null, "component" ,container.Add ); AddIf( null != (((object)this._cveId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._cveId.ToString()) : null, "cveId" ,container.Add ); + AddIf( null != (((object)this._componentId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._componentId.ToString()) : null, "componentId" ,container.Add ); + AddIf( null != (((object)this._componentName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._componentName.ToString()) : null, "componentName" ,container.Add ); + AddIf( null != (((object)this._componentVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._componentVersion.ToString()) : null, "componentVersion" ,container.Add ); AddIf( null != (((object)this._severity)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._severity.ToString()) : null, "severity" ,container.Add ); - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._cveName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._cveName.ToString()) : null, "cveName" ,container.Add ); AddIf( null != (((object)this._cvssScore)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._cvssScore.ToString()) : null, "cvssScore" ,container.Add ); - AddIf( null != (((object)this._cvssVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._cvssVersion.ToString()) : null, "cvssVersion" ,container.Add ); AddIf( null != (((object)this._cvssV2Score)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._cvssV2Score.ToString()) : null, "cvssV2Score" ,container.Add ); AddIf( null != (((object)this._cvssV3Score)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._cvssV3Score.ToString()) : null, "cvssV3Score" ,container.Add ); + AddIf( null != (((object)this._cvssVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._cvssVersion.ToString()) : null, "cvssVersion" ,container.Add ); + AddIf( null != this._effectiveCvssScore ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((float)this._effectiveCvssScore) : null, "effectiveCvssScore" ,container.Add ); + AddIf( null != this._effectiveCvssVersion ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((int)this._effectiveCvssVersion) : null, "effectiveCvssVersion" ,container.Add ); + if (null != this._cvssScores) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); + foreach( var __x in this._cvssScores ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("cvssScores",__w); + } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) { if (null != this._link) { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); - foreach( var __x in this._link ) + var __r = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); + foreach( var __s in this._link ) { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); } - container.Add("links",__w); + container.Add("links",__r); } } AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveSummary.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveSummary.PowerShell.cs index 94215829bc6d..75b5add3721e 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveSummary.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveSummary.PowerShell.cs @@ -76,30 +76,34 @@ internal CveSummary(global::System.Collections.IDictionary content) return; } // actually deserialize - if (content.Contains("Critical")) + if (content.Contains("CriticalCveCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).Critical = (long?) content.GetValueForProperty("Critical",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).Critical, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).CriticalCveCount = (long?) content.GetValueForProperty("CriticalCveCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).CriticalCveCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("High")) + if (content.Contains("HighCveCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).High = (long?) content.GetValueForProperty("High",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).High, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).HighCveCount = (long?) content.GetValueForProperty("HighCveCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).HighCveCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("Medium")) + if (content.Contains("MediumCveCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).Medium = (long?) content.GetValueForProperty("Medium",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).Medium, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).MediumCveCount = (long?) content.GetValueForProperty("MediumCveCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).MediumCveCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("Low")) + if (content.Contains("LowCveCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).Low = (long?) content.GetValueForProperty("Low",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).Low, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).LowCveCount = (long?) content.GetValueForProperty("LowCveCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).LowCveCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("Unknown")) + if (content.Contains("UnknownCveCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).Unknown = (long?) content.GetValueForProperty("Unknown",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).Unknown, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).UnknownCveCount = (long?) content.GetValueForProperty("UnknownCveCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).UnknownCveCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SummaryType")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType = (string) content.GetValueForProperty("SummaryType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -117,30 +121,34 @@ internal CveSummary(global::System.Management.Automation.PSObject content) return; } // actually deserialize - if (content.Contains("Critical")) + if (content.Contains("CriticalCveCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).Critical = (long?) content.GetValueForProperty("Critical",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).Critical, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).CriticalCveCount = (long?) content.GetValueForProperty("CriticalCveCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).CriticalCveCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("High")) + if (content.Contains("HighCveCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).High = (long?) content.GetValueForProperty("High",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).High, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).HighCveCount = (long?) content.GetValueForProperty("HighCveCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).HighCveCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("Medium")) + if (content.Contains("MediumCveCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).Medium = (long?) content.GetValueForProperty("Medium",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).Medium, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).MediumCveCount = (long?) content.GetValueForProperty("MediumCveCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).MediumCveCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("Low")) + if (content.Contains("LowCveCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).Low = (long?) content.GetValueForProperty("Low",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).Low, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).LowCveCount = (long?) content.GetValueForProperty("LowCveCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).LowCveCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } - if (content.Contains("Unknown")) + if (content.Contains("UnknownCveCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).Unknown = (long?) content.GetValueForProperty("Unknown",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).Unknown, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).UnknownCveCount = (long?) content.GetValueForProperty("UnknownCveCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveSummaryInternal)this).UnknownCveCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SummaryType")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType = (string) content.GetValueForProperty("SummaryType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveSummary.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveSummary.cs index f50bc756d590..6802bce53926 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveSummary.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveSummary.cs @@ -19,50 +19,57 @@ public partial class CveSummary : /// private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceProperties __summaryResourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceProperties(); - /// Backing field for property. - private long? _critical; + /// Backing field for property. + private long? _criticalCveCount; /// The total number of critical severity CVEs detected [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public long? Critical { get => this._critical; set => this._critical = value; } + public long? CriticalCveCount { get => this._criticalCveCount; set => this._criticalCveCount = value; } - /// Backing field for property. - private long? _high; + /// Backing field for property. + private long? _highCveCount; /// The total number of high severity CVEs detected [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public long? High { get => this._high; set => this._high = value; } + public long? HighCveCount { get => this._highCveCount; set => this._highCveCount = value; } - /// Backing field for property. - private long? _low; + /// Backing field for property. + private long? _lowCveCount; /// The total number of low severity CVEs detected [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public long? Low { get => this._low; set => this._low = value; } + public long? LowCveCount { get => this._lowCveCount; set => this._lowCveCount = value; } - /// Backing field for property. - private long? _medium; + /// Backing field for property. + private long? _mediumCveCount; /// The total number of medium severity CVEs detected [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public long? Medium { get => this._medium; set => this._medium = value; } + public long? MediumCveCount { get => this._mediumCveCount; set => this._mediumCveCount = value; } - /// Describes the type of summary. + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).ProvisioningState = value ?? null; } + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).ProvisioningState; } + + /// The type of summary. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Constant] [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SummaryType { get => "CVE"; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).SummaryType = "CVE"; } + public string SummaryType { get => "CommonVulnerabilitiesAndExposures"; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).SummaryType = "CommonVulnerabilitiesAndExposures"; } - /// Backing field for property. - private long? _unknown; + /// Backing field for property. + private long? _unknownCveCount; /// The total number of unknown severity CVEs detected [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public long? Unknown { get => this._unknown; set => this._unknown = value; } + public long? UnknownCveCount { get => this._unknownCveCount; set => this._unknownCveCount = value; } /// Creates an new instance. public CveSummary() { - this.__summaryResourceProperties.SummaryType = "CVE"; + this.__summaryResourceProperties.SummaryType = "CommonVulnerabilitiesAndExposures"; } /// Validates that this object meets the validation criteria. @@ -90,9 +97,9 @@ public partial interface ICveSummary : Create = true, Update = true, Description = @"The total number of critical severity CVEs detected", - SerializedName = @"critical", + SerializedName = @"criticalCveCount", PossibleTypes = new [] { typeof(long) })] - long? Critical { get; set; } + long? CriticalCveCount { get; set; } /// The total number of high severity CVEs detected [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -101,9 +108,9 @@ public partial interface ICveSummary : Create = true, Update = true, Description = @"The total number of high severity CVEs detected", - SerializedName = @"high", + SerializedName = @"highCveCount", PossibleTypes = new [] { typeof(long) })] - long? High { get; set; } + long? HighCveCount { get; set; } /// The total number of low severity CVEs detected [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -112,9 +119,9 @@ public partial interface ICveSummary : Create = true, Update = true, Description = @"The total number of low severity CVEs detected", - SerializedName = @"low", + SerializedName = @"lowCveCount", PossibleTypes = new [] { typeof(long) })] - long? Low { get; set; } + long? LowCveCount { get; set; } /// The total number of medium severity CVEs detected [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -123,9 +130,9 @@ public partial interface ICveSummary : Create = true, Update = true, Description = @"The total number of medium severity CVEs detected", - SerializedName = @"medium", + SerializedName = @"mediumCveCount", PossibleTypes = new [] { typeof(long) })] - long? Medium { get; set; } + long? MediumCveCount { get; set; } /// The total number of unknown severity CVEs detected [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -134,9 +141,9 @@ public partial interface ICveSummary : Create = true, Update = true, Description = @"The total number of unknown severity CVEs detected", - SerializedName = @"unknown", + SerializedName = @"unknownCveCount", PossibleTypes = new [] { typeof(long) })] - long? Unknown { get; set; } + long? UnknownCveCount { get; set; } } /// Properties for a CVE analysis summary. @@ -144,15 +151,15 @@ internal partial interface ICveSummaryInternal : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal { /// The total number of critical severity CVEs detected - long? Critical { get; set; } + long? CriticalCveCount { get; set; } /// The total number of high severity CVEs detected - long? High { get; set; } + long? HighCveCount { get; set; } /// The total number of low severity CVEs detected - long? Low { get; set; } + long? LowCveCount { get; set; } /// The total number of medium severity CVEs detected - long? Medium { get; set; } + long? MediumCveCount { get; set; } /// The total number of unknown severity CVEs detected - long? Unknown { get; set; } + long? UnknownCveCount { get; set; } } } \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveSummary.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveSummary.json.cs index f98d5fca5a6d..f3a890ef9e6d 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveSummary.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveSummary.json.cs @@ -66,11 +66,11 @@ internal CveSummary(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime. return; } __summaryResourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceProperties(json); - {_critical = If( json?.PropertyT("critical"), out var __jsonCritical) ? (long?)__jsonCritical : _critical;} - {_high = If( json?.PropertyT("high"), out var __jsonHigh) ? (long?)__jsonHigh : _high;} - {_medium = If( json?.PropertyT("medium"), out var __jsonMedium) ? (long?)__jsonMedium : _medium;} - {_low = If( json?.PropertyT("low"), out var __jsonLow) ? (long?)__jsonLow : _low;} - {_unknown = If( json?.PropertyT("unknown"), out var __jsonUnknown) ? (long?)__jsonUnknown : _unknown;} + {_criticalCveCount = If( json?.PropertyT("criticalCveCount"), out var __jsonCriticalCveCount) ? (long?)__jsonCriticalCveCount : _criticalCveCount;} + {_highCveCount = If( json?.PropertyT("highCveCount"), out var __jsonHighCveCount) ? (long?)__jsonHighCveCount : _highCveCount;} + {_mediumCveCount = If( json?.PropertyT("mediumCveCount"), out var __jsonMediumCveCount) ? (long?)__jsonMediumCveCount : _mediumCveCount;} + {_lowCveCount = If( json?.PropertyT("lowCveCount"), out var __jsonLowCveCount) ? (long?)__jsonLowCveCount : _lowCveCount;} + {_unknownCveCount = If( json?.PropertyT("unknownCveCount"), out var __jsonUnknownCveCount) ? (long?)__jsonUnknownCveCount : _unknownCveCount;} AfterFromJson(json); } @@ -106,11 +106,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode return container; } __summaryResourceProperties?.ToJson(container, serializationMode); - AddIf( null != this._critical ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._critical) : null, "critical" ,container.Add ); - AddIf( null != this._high ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._high) : null, "high" ,container.Add ); - AddIf( null != this._medium ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._medium) : null, "medium" ,container.Add ); - AddIf( null != this._low ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._low) : null, "low" ,container.Add ); - AddIf( null != this._unknown ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._unknown) : null, "unknown" ,container.Add ); + AddIf( null != this._criticalCveCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._criticalCveCount) : null, "criticalCveCount" ,container.Add ); + AddIf( null != this._highCveCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._highCveCount) : null, "highCveCount" ,container.Add ); + AddIf( null != this._mediumCveCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._mediumCveCount) : null, "mediumCveCount" ,container.Add ); + AddIf( null != this._lowCveCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._lowCveCount) : null, "lowCveCount" ,container.Add ); + AddIf( null != this._unknownCveCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._unknownCveCount) : null, "unknownCveCount" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveListResult.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CvssScore.PowerShell.cs similarity index 69% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveListResult.PowerShell.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CvssScore.PowerShell.cs index 8fa9fa4ab3c7..14c1552041d0 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveListResult.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CvssScore.PowerShell.cs @@ -7,9 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; - /// List of CVE results. - [System.ComponentModel.TypeConverter(typeof(CveListResultTypeConverter))] - public partial class CveListResult + /// Common Vulnerability Scoring System values. + [System.ComponentModel.TypeConverter(typeof(CvssScoreTypeConverter))] + public partial class CvssScore { /// @@ -63,11 +63,11 @@ public partial class CveListResult 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. - internal CveListResult(global::System.Collections.IDictionary content) + internal CvssScore(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -76,23 +76,23 @@ internal CveListResult(global::System.Collections.IDictionary content) return; } // actually deserialize - if (content.Contains("Value")) + if (content.Contains("Version")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScoreInternal)this).Version = (int) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScoreInternal)this).Version, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } - if (content.Contains("NextLink")) + if (content.Contains("Score")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScoreInternal)this).Score = (float?) content.GetValueForProperty("Score",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScoreInternal)this).Score, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); } 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. - internal CveListResult(global::System.Management.Automation.PSObject content) + internal CvssScore(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -101,49 +101,49 @@ internal CveListResult(global::System.Management.Automation.PSObject content) return; } // actually deserialize - if (content.Contains("Value")) + if (content.Contains("Version")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CveResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScoreInternal)this).Version = (int) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScoreInternal)this).Version, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } - if (content.Contains("NextLink")) + if (content.Contains("Score")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScoreInternal)this).Score = (float?) content.GetValueForProperty("Score",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScoreInternal)this).Score, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); } 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScore DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new CveListResult(content); + return new CvssScore(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.FirmwareAnalysis.Models.ICveListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScore DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new CveListResult(content); + return new CvssScore(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// 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.FirmwareAnalysis.Models.ICveListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScore FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -162,9 +162,9 @@ public override string ToString() return ToJsonString(); } } - /// List of CVE results. - [System.ComponentModel.TypeConverter(typeof(CveListResultTypeConverter))] - public partial interface ICveListResult + /// Common Vulnerability Scoring System values. + [System.ComponentModel.TypeConverter(typeof(CvssScoreTypeConverter))] + public partial interface ICvssScore { diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CvssScore.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CvssScore.TypeConverter.cs new file mode 100644 index 000000000000..9899f53ab292 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CvssScore.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CvssScoreTypeConverter : 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.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Models.ICvssScore ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScore).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CvssScore.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CvssScore.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CvssScore.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/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CvssScore.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CvssScore.cs new file mode 100644 index 000000000000..73fec268b1ad --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CvssScore.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + + /// Common Vulnerability Scoring System values. + public partial class CvssScore : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScore, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScoreInternal + { + + /// Backing field for property. + private float? _score; + + /// The score of the CVE according to the CVSS specified. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public float? Score { get => this._score; set => this._score = value; } + + /// Backing field for property. + private int _version; + + /// The version of the Common Vulnerability Scoring System (CVSS). + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public int Version { get => this._version; set => this._version = value; } + + /// Creates an new instance. + public CvssScore() + { + + } + } + /// Common Vulnerability Scoring System values. + public partial interface ICvssScore : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable + { + /// The score of the CVE according to the CVSS specified. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The score of the CVE according to the CVSS specified.", + SerializedName = @"score", + PossibleTypes = new [] { typeof(float) })] + float? Score { get; set; } + /// The version of the Common Vulnerability Scoring System (CVSS). + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The version of the Common Vulnerability Scoring System (CVSS).", + SerializedName = @"version", + PossibleTypes = new [] { typeof(int) })] + int Version { get; set; } + + } + /// Common Vulnerability Scoring System values. + internal partial interface ICvssScoreInternal + + { + /// The score of the CVE according to the CVSS specified. + float? Score { get; set; } + /// The version of the Common Vulnerability Scoring System (CVSS). + int Version { get; set; } + + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CvssScore.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CvssScore.json.cs new file mode 100644 index 000000000000..82d0071e85a9 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CvssScore.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.FirmwareAnalysis.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + + /// Common Vulnerability Scoring System values. + public partial class CvssScore + { + + /// + /// 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.FirmwareAnalysis.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.FirmwareAnalysis.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.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject instance to deserialize from. + internal CvssScore(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (int)__jsonVersion : _version;} + {_score = If( json?.PropertyT("score"), out var __jsonScore) ? (float?)__jsonScore : _score;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScore. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScore. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICvssScore FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new CvssScore(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.FirmwareAnalysis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber(this._version), "version" ,container.Add ); + AddIf( null != this._score ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((float)this._score) : null, "score" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/ErrorResponse.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/ErrorResponse.cs index afa51237a1b9..852ff507337d 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/ErrorResponse.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/ErrorResponse.cs @@ -40,22 +40,22 @@ public partial class ErrorResponse : public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).Message; } /// Internal Acessors for AdditionalInfo - System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).AdditionalInfo = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).AdditionalInfo = value ?? null /* arrayOf */; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).Code = value ?? null; } /// Internal Acessors for Detail - System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).Detail = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).Detail = value ?? null /* arrayOf */; } /// Internal Acessors for Error Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ErrorDetail()); set { {_error = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).Message = value ?? null; } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).Target = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IErrorDetailInternal)Error).Target = value ?? null; } /// The error target. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Firmware.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Firmware.cs index 628e0fe9e586..bdc2955f34cb 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Firmware.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Firmware.cs @@ -14,9 +14,10 @@ public partial class Firmware : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource(); /// User-specified description of the firmware. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] @@ -34,25 +35,43 @@ public partial class Firmware : /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareProperties Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwarePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwarePropertiesInternal)Property).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwarePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwarePropertiesInternal)Property).ProvisioningState = value ?? null; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name = value ?? null; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type = value ?? null; } /// Firmware model. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] @@ -60,12 +79,12 @@ public partial class Firmware : /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareProperties _property; - /// The properties of a firmware + /// The resource-specific properties for this resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareProperties()); set => this._property = value; } @@ -89,37 +108,37 @@ public partial class Firmware : /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; } + internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type; } /// Firmware vendor. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] @@ -143,14 +162,14 @@ public Firmware() /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); } } /// Firmware definition public partial interface IFirmware : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResource + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource { /// User-specified description of the firmware. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( @@ -206,7 +225,7 @@ public partial interface IFirmware : Description = @"Provisioning state of the resource.", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Canceled", "Failed")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] string ProvisioningState { get; } /// The status of firmware scan. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( @@ -257,7 +276,7 @@ public partial interface IFirmware : } /// Firmware definition internal partial interface IFirmwareInternal : - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResourceInternal { /// User-specified description of the firmware. string Description { get; set; } @@ -267,10 +286,10 @@ internal partial interface IFirmwareInternal : long? FileSize { get; set; } /// Firmware model. string Model { get; set; } - /// The properties of a firmware + /// The resource-specific properties for this resource. Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareProperties Property { get; set; } /// Provisioning state of the resource. - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Canceled", "Failed")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] string ProvisioningState { get; set; } /// The status of firmware scan. [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Pending", "Extracting", "Analyzing", "Ready", "Error")] diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Firmware.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Firmware.json.cs index 5fc0e5ead97c..87e2ccedd534 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Firmware.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Firmware.json.cs @@ -65,7 +65,7 @@ internal Firmware(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Js { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Resource(json); + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource(json); {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareAnalysisIdentity.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareAnalysisIdentity.PowerShell.cs index d8973534a16a..343396cda36a 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareAnalysisIdentity.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareAnalysisIdentity.PowerShell.cs @@ -117,9 +117,13 @@ internal FirmwareAnalysisIdentity(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentityInternal)this).FirmwareId = (string) content.GetValueForProperty("FirmwareId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentityInternal)this).FirmwareId, global::System.Convert.ToString); } - if (content.Contains("SummaryName")) + if (content.Contains("SummaryType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentityInternal)this).SummaryName = (string) content.GetValueForProperty("SummaryName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentityInternal)this).SummaryName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentityInternal)this).SummaryType = (string) content.GetValueForProperty("SummaryType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentityInternal)this).SummaryType, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentityInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentityInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Id")) { @@ -158,9 +162,13 @@ internal FirmwareAnalysisIdentity(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentityInternal)this).FirmwareId = (string) content.GetValueForProperty("FirmwareId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentityInternal)this).FirmwareId, global::System.Convert.ToString); } - if (content.Contains("SummaryName")) + if (content.Contains("SummaryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentityInternal)this).SummaryType = (string) content.GetValueForProperty("SummaryType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentityInternal)this).SummaryType, global::System.Convert.ToString); + } + if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentityInternal)this).SummaryName = (string) content.GetValueForProperty("SummaryName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentityInternal)this).SummaryName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentityInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentityInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Id")) { diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareAnalysisIdentity.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareAnalysisIdentity.cs index b876768e88f4..d82643133588 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareAnalysisIdentity.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareAnalysisIdentity.cs @@ -26,6 +26,13 @@ public partial class FirmwareAnalysisIdentity : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string Id { get => this._id; set => this._id = value; } + /// Backing field for property. + private string _name; + + /// The Firmware analysis summary name describing the type of summary. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + /// Backing field for property. private string _resourceGroupName; @@ -40,12 +47,12 @@ public partial class FirmwareAnalysisIdentity : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - /// Backing field for property. - private string _summaryName; + /// Backing field for property. + private string _summaryType; /// The Firmware analysis summary name describing the type of summary. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public string SummaryName { get => this._summaryName; set => this._summaryName = value; } + public string SummaryType { get => this._summaryType; set => this._summaryType = value; } /// Backing field for property. private string _workspaceName; @@ -85,6 +92,17 @@ public partial interface IFirmwareAnalysisIdentity : SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] string Id { get; set; } + /// The Firmware analysis summary name describing the type of summary. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Firmware analysis summary name describing the type of summary.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } /// The name of the resource group. The name is case insensitive. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -115,10 +133,10 @@ public partial interface IFirmwareAnalysisIdentity : Create = true, Update = true, Description = @"The Firmware analysis summary name describing the type of summary.", - SerializedName = @"summaryName", + SerializedName = @"summaryType", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CVE", "BinaryHardening", "CryptoCertificate", "CryptoKey")] - string SummaryName { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CommonVulnerabilitiesAndExposures", "BinaryHardening", "CryptoCertificate", "CryptoKey")] + string SummaryType { get; set; } /// The name of the firmware analysis workspace. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -139,13 +157,15 @@ internal partial interface IFirmwareAnalysisIdentityInternal string FirmwareId { get; set; } /// Resource identity path string Id { get; set; } + /// The Firmware analysis summary name describing the type of summary. + string Name { get; set; } /// The name of the resource group. The name is case insensitive. string ResourceGroupName { get; set; } /// The ID of the target subscription. The value must be an UUID. string SubscriptionId { get; set; } /// The Firmware analysis summary name describing the type of summary. - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CVE", "BinaryHardening", "CryptoCertificate", "CryptoKey")] - string SummaryName { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CommonVulnerabilitiesAndExposures", "BinaryHardening", "CryptoCertificate", "CryptoKey")] + string SummaryType { get; set; } /// The name of the firmware analysis workspace. string WorkspaceName { get; set; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareAnalysisIdentity.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareAnalysisIdentity.json.cs index 99d75fa0d7ef..cdab225ee7bc 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareAnalysisIdentity.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareAnalysisIdentity.json.cs @@ -68,7 +68,8 @@ internal FirmwareAnalysisIdentity(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAna {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)_resourceGroupName;} {_workspaceName = If( json?.PropertyT("workspaceName"), out var __jsonWorkspaceName) ? (string)__jsonWorkspaceName : (string)_workspaceName;} {_firmwareId = If( json?.PropertyT("firmwareId"), out var __jsonFirmwareId) ? (string)__jsonFirmwareId : (string)_firmwareId;} - {_summaryName = If( json?.PropertyT("summaryName"), out var __jsonSummaryName) ? (string)__jsonSummaryName : (string)_summaryName;} + {_summaryType = If( json?.PropertyT("summaryType"), out var __jsonSummaryType) ? (string)__jsonSummaryType : (string)_summaryType;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } @@ -108,7 +109,8 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add ); AddIf( null != (((object)this._workspaceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._workspaceName.ToString()) : null, "workspaceName" ,container.Add ); AddIf( null != (((object)this._firmwareId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._firmwareId.ToString()) : null, "firmwareId" ,container.Add ); - AddIf( null != (((object)this._summaryName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._summaryName.ToString()) : null, "summaryName" ,container.Add ); + AddIf( null != (((object)this._summaryType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._summaryType.ToString()) : null, "summaryType" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareList.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareListResult.PowerShell.cs similarity index 70% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareList.PowerShell.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareListResult.PowerShell.cs index 213c533e1c42..87bf050dea63 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareList.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareListResult.PowerShell.cs @@ -7,9 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; - /// List of firmwares - [System.ComponentModel.TypeConverter(typeof(FirmwareListTypeConverter))] - public partial class FirmwareList + /// The response of a Firmware list operation. + [System.ComponentModel.TypeConverter(typeof(FirmwareListResultTypeConverter))] + public partial class FirmwareListResult { /// @@ -63,37 +63,37 @@ public partial class FirmwareList 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.FirmwareAnalysis.Models.IFirmwareList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new FirmwareList(content); + return new FirmwareListResult(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.FirmwareAnalysis.Models.IFirmwareList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new FirmwareList(content); + return new FirmwareListResult(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal FirmwareList(global::System.Collections.IDictionary content) + internal FirmwareListResult(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -104,21 +104,21 @@ internal FirmwareList(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResultInternal)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. - internal FirmwareList(global::System.Management.Automation.PSObject content) + internal FirmwareListResult(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -129,21 +129,21 @@ internal FirmwareList(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// 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.FirmwareAnalysis.Models.IFirmwareList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -162,9 +162,9 @@ public override string ToString() return ToJsonString(); } } - /// List of firmwares - [System.ComponentModel.TypeConverter(typeof(FirmwareListTypeConverter))] - public partial interface IFirmwareList + /// The response of a Firmware list operation. + [System.ComponentModel.TypeConverter(typeof(FirmwareListResultTypeConverter))] + public partial interface IFirmwareListResult { diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryListResult.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareListResult.TypeConverter.cs similarity index 85% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryListResult.TypeConverter.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareListResult.TypeConverter.cs index 44826c8361c2..025d8cc0d2d6 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryListResult.TypeConverter.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareListResult.TypeConverter.cs @@ -8,9 +8,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class SummaryListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class FirmwareListResultTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class SummaryListResultTypeConverter : global::System.Management. public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -95,31 +95,31 @@ public static bool CanConvertFrom(dynamic sourceValue) /// 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. + /// 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 + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResult).IsAssignableFrom(type)) { return sourceValue; } try { - return SummaryListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return FirmwareListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummar } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return SummaryListResult.DeserializeFromPSObject(sourceValue); + return FirmwareListResult.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return SummaryListResult.DeserializeFromDictionary(sourceValue); + return FirmwareListResult.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareList.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareListResult.cs similarity index 63% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareList.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareListResult.cs index d4370741718b..5d5087b60ff1 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareList.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareListResult.cs @@ -7,70 +7,67 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// List of firmwares - public partial class FirmwareList : - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareList, - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListInternal + /// The response of a Firmware list operation. + public partial class FirmwareListResult : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResult, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResultInternal { - /// Internal Acessors for Value - System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListInternal.Value { get => this._value; set { {_value = value;} } } - /// Backing field for property. private string _nextLink; - /// The uri to fetch the next page of asset. + /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. private System.Collections.Generic.List _value; - /// The list of firmwares. + /// The Firmware items on this page [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public System.Collections.Generic.List Value { get => this._value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } - /// Creates an new instance. - public FirmwareList() + /// Creates an new instance. + public FirmwareListResult() { } } - /// List of firmwares - public partial interface IFirmwareList : + /// The response of a Firmware list operation. + public partial interface IFirmwareListResult : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable { - /// The uri to fetch the next page of asset. + /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The uri to fetch the next page of asset.", + Description = @"The link to the next page of items", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] string NextLink { get; set; } - /// The list of firmwares. + /// The Firmware items on this page [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = true, + Required = true, + ReadOnly = false, Read = true, - Create = false, - Update = false, - Description = @"The list of firmwares.", + Create = true, + Update = true, + Description = @"The Firmware items on this page", SerializedName = @"value", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmware) })] - System.Collections.Generic.List Value { get; } + System.Collections.Generic.List Value { get; set; } } - /// List of firmwares - internal partial interface IFirmwareListInternal + /// The response of a Firmware list operation. + internal partial interface IFirmwareListResultInternal { - /// The uri to fetch the next page of asset. + /// The link to the next page of items string NextLink { get; set; } - /// The list of firmwares. + /// The Firmware items on this page System.Collections.Generic.List Value { get; set; } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareList.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareListResult.json.cs similarity index 84% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareList.json.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareListResult.json.cs index 2e64271906e9..d4d83fa80e12 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareList.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareListResult.json.cs @@ -7,8 +7,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// List of firmwares - public partial class FirmwareList + /// The response of a Firmware list operation. + public partial class FirmwareListResult { /// @@ -54,10 +54,10 @@ public partial class FirmwareList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject instance to deserialize from. - internal FirmwareList(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) + internal FirmwareListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -71,25 +71,25 @@ internal FirmwareList(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtim } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareList FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new FirmwareList(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new FirmwareListResult(json) : null; } /// - /// Serializes this instance of into a . + /// 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 . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode) { @@ -101,17 +101,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) + if (null != this._value) { - if (null != this._value) + var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); - foreach( var __x in this._value ) - { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); - } - container.Add("value",__w); + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); } + container.Add("value",__w); } AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); AfterToJson(ref container); diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareProperties.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareProperties.cs index df6823899035..f623e96bff6a 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareProperties.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareProperties.cs @@ -143,7 +143,7 @@ public partial interface IFirmwareProperties : Description = @"Provisioning state of the resource.", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Canceled", "Failed")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] string ProvisioningState { get; } /// The status of firmware scan. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( @@ -205,7 +205,7 @@ internal partial interface IFirmwarePropertiesInternal /// Firmware model. string Model { get; set; } /// Provisioning state of the resource. - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Canceled", "Failed")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] string ProvisioningState { get; set; } /// The status of firmware scan. [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Pending", "Extracting", "Analyzing", "Ready", "Error")] diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareSummary.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareSummary.PowerShell.cs index dc6a9a84091f..7b89beaeb75c 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareSummary.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareSummary.PowerShell.cs @@ -134,6 +134,10 @@ internal FirmwareSummary(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType = (string) content.GetValueForProperty("SummaryType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -183,6 +187,10 @@ internal FirmwareSummary(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType = (string) content.GetValueForProperty("SummaryType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareSummary.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareSummary.cs index c62a3ec02d62..8bd2af266fb3 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareSummary.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareSummary.cs @@ -61,6 +61,13 @@ public partial class FirmwareSummary : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public long? FileSize { get => this._fileSize; set => this._fileSize = value; } + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).ProvisioningState = value ?? null; } + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).ProvisioningState; } + /// Backing field for property. private long? _rootFileSystem; @@ -68,7 +75,7 @@ public partial class FirmwareSummary : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public long? RootFileSystem { get => this._rootFileSystem; set => this._rootFileSystem = value; } - /// Describes the type of summary. + /// The type of summary. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Constant] [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] public string SummaryType { get => "Firmware"; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)__summaryResourceProperties).SummaryType = "Firmware"; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareUpdateDefinition.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareUpdateDefinition.cs index 9b9b54fc11cc..398950e965a0 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareUpdateDefinition.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareUpdateDefinition.cs @@ -29,7 +29,7 @@ public partial class FirmwareUpdateDefinition : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareProperties Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareUpdateDefinitionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareUpdateDefinitionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwarePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwarePropertiesInternal)Property).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareUpdateDefinitionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwarePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwarePropertiesInternal)Property).ProvisioningState = value ?? null; } /// Firmware model. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] @@ -126,7 +126,7 @@ public partial interface IFirmwareUpdateDefinition : Description = @"Provisioning state of the resource.", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Canceled", "Failed")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] string ProvisioningState { get; } /// The status of firmware scan. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( @@ -190,7 +190,7 @@ internal partial interface IFirmwareUpdateDefinitionInternal /// The editable properties of a firmware Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareProperties Property { get; set; } /// Provisioning state of the resource. - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Canceled", "Failed")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] string ProvisioningState { get; set; } /// The status of firmware scan. [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Pending", "Extracting", "Analyzing", "Ready", "Error")] diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Operation.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Operation.cs index dec81bb9475b..dd31d03102d5 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Operation.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Operation.cs @@ -73,16 +73,16 @@ public partial class Operation : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.OperationDisplay()); set { {_display = value;} } } /// Internal Acessors for DisplayDescription - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationDisplayInternal)Display).Description = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationDisplayInternal)Display).Description = value ?? null; } /// Internal Acessors for DisplayOperation - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationDisplayInternal)Display).Operation = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationDisplayInternal)Display).Operation = value ?? null; } /// Internal Acessors for DisplayProvider - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationDisplayInternal)Display).Provider = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationDisplayInternal)Display).Provider = value ?? null; } /// Internal Acessors for DisplayResource - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationDisplayInternal)Display).Resource = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationDisplayInternal)Display).Resource = value ?? null; } /// Internal Acessors for IsDataAction bool? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperationInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PairedKey.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PairedKey.cs index 5628215d69dc..ca4c533aea87 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PairedKey.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PairedKey.cs @@ -45,7 +45,7 @@ public partial interface IPairedKey : Create = true, Update = true, Description = @"ID of the paired key or certificate.", - SerializedName = @"id", + SerializedName = @"pairedKeyId", PossibleTypes = new [] { typeof(string) })] string Id { get; set; } /// The type indicating whether the paired object is a key or certificate. diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PairedKey.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PairedKey.json.cs index d2ff9fe6398b..e1de88133030 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PairedKey.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PairedKey.json.cs @@ -77,7 +77,7 @@ internal PairedKey(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.J { return; } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_id = If( json?.PropertyT("pairedKeyId"), out var __jsonPairedKeyId) ? (string)__jsonPairedKeyId : (string)_id;} {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._id.ToString()) : null, "pairedKeyId" ,container.Add ); AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHash.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHash.PowerShell.cs index cd1f6e2ca66a..a93d9252bfab 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHash.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHash.PowerShell.cs @@ -137,6 +137,10 @@ internal PasswordHash(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashInternal)this).Algorithm = (string) content.GetValueForProperty("Algorithm",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashInternal)this).Algorithm, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashInternal)this).ProvisioningState, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -182,6 +186,10 @@ internal PasswordHash(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashInternal)this).Algorithm = (string) content.GetValueForProperty("Algorithm",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashInternal)this).Algorithm, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashInternal)this).ProvisioningState, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHash.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHash.cs index 622ae711c598..141f0aae61ce 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHash.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHash.cs @@ -48,6 +48,16 @@ public partial class PasswordHash : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string Id { get => this._id; set => this._id = value; } + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + /// Backing field for property. private string _salt; @@ -127,6 +137,18 @@ public partial interface IPasswordHash : SerializedName = @"passwordHashId", PossibleTypes = new [] { typeof(string) })] string Id { get; set; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; } /// Salt of the password hash [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -165,6 +187,9 @@ internal partial interface IPasswordHashInternal string Hash { get; set; } /// ID for password hash string Id { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; set; } /// Salt of the password hash string Salt { get; set; } /// User name of password hash diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHash.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHash.json.cs index f8e447fb9b82..a1ea8ffe84cb 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHash.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHash.json.cs @@ -84,6 +84,7 @@ internal PasswordHash(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtim {_context = If( json?.PropertyT("context"), out var __jsonContext) ? (string)__jsonContext : (string)_context;} {_username = If( json?.PropertyT("username"), out var __jsonUsername) ? (string)__jsonUsername : (string)_username;} {_algorithm = If( json?.PropertyT("algorithm"), out var __jsonAlgorithm) ? (string)__jsonAlgorithm : (string)_algorithm;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} AfterFromJson(json); } @@ -113,6 +114,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode AddIf( null != (((object)this._context)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._context.ToString()) : null, "context" ,container.Add ); AddIf( null != (((object)this._username)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._username.ToString()) : null, "username" ,container.Add ); AddIf( null != (((object)this._algorithm)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._algorithm.ToString()) : null, "algorithm" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashListResult.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashListResult.TypeConverter.cs deleted file mode 100644 index 1e3ae0a6e559..000000000000 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashListResult.TypeConverter.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models -{ - using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class PasswordHashListResultTypeConverter : 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.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Models.IPasswordHashListResult ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashListResult).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return PasswordHashListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return PasswordHashListResult.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return PasswordHashListResult.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/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResource.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResource.PowerShell.cs index 2c4771547e98..be09df10d1d8 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResource.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResource.PowerShell.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; - /// Password hash resource + /// The object representing a firmware analysis password hash result resource [System.ComponentModel.TypeConverter(typeof(PasswordHashResourceTypeConverter))] public partial class PasswordHashResource { @@ -153,6 +153,10 @@ internal PasswordHashResource(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } if (content.Contains("PasswordHashId")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceInternal)this).PasswordHashId = (string) content.GetValueForProperty("PasswordHashId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceInternal)this).PasswordHashId, global::System.Convert.ToString); @@ -242,6 +246,10 @@ internal PasswordHashResource(global::System.Management.Automation.PSObject cont { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } if (content.Contains("PasswordHashId")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceInternal)this).PasswordHashId = (string) content.GetValueForProperty("PasswordHashId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceInternal)this).PasswordHashId, global::System.Convert.ToString); @@ -290,7 +298,7 @@ public override string ToString() return ToJsonString(); } } - /// Password hash resource + /// The object representing a firmware analysis password hash result resource [System.ComponentModel.TypeConverter(typeof(PasswordHashResourceTypeConverter))] public partial interface IPasswordHashResource diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResource.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResource.cs index ed54898bc7e8..4d44d2dd4528 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResource.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResource.cs @@ -7,16 +7,17 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// Password hash resource + /// The object representing a firmware analysis password hash result resource public partial class PasswordHashResource : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResource, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceInternal, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource(); /// Algorithm of the password hash [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] @@ -38,26 +39,47 @@ public partial class PasswordHashResource : /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHash Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PasswordHash()); set { {_property = value;} } } + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashInternal)Property).ProvisioningState = value ?? null; } + /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name = value ?? null; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type = value ?? null; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name; } /// ID for password hash [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] @@ -66,10 +88,14 @@ public partial class PasswordHashResource : /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHash _property; - /// The properties of a password hash found within a firmware image + /// The resource-specific properties for this resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHash Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PasswordHash()); set => this._property = value; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashInternal)Property).ProvisioningState; } + /// Salt of the password hash [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string Salt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashInternal)Property).Salt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashInternal)Property).Salt = value ?? null; } @@ -78,37 +104,37 @@ public partial class PasswordHashResource : /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; } + internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type; } /// User name of password hash [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] @@ -128,14 +154,14 @@ public PasswordHashResource() /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); } } - /// Password hash resource + /// The object representing a firmware analysis password hash result resource public partial interface IPasswordHashResource : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResource + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource { /// Algorithm of the password hash [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( @@ -192,6 +218,18 @@ public partial interface IPasswordHashResource : SerializedName = @"passwordHashId", PossibleTypes = new [] { typeof(string) })] string PasswordHashId { get; set; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; } /// Salt of the password hash [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -216,9 +254,9 @@ public partial interface IPasswordHashResource : string Username { get; set; } } - /// Password hash resource + /// The object representing a firmware analysis password hash result resource internal partial interface IPasswordHashResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResourceInternal { /// Algorithm of the password hash string Algorithm { get; set; } @@ -230,8 +268,11 @@ internal partial interface IPasswordHashResourceInternal : string Hash { get; set; } /// ID for password hash string PasswordHashId { get; set; } - /// The properties of a password hash found within a firmware image + /// The resource-specific properties for this resource. Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHash Property { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; set; } /// Salt of the password hash string Salt { get; set; } /// User name of password hash diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResource.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResource.json.cs index c1b5b1e67463..054d041b735f 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResource.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResource.json.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// Password hash resource + /// The object representing a firmware analysis password hash result resource public partial class PasswordHashResource { @@ -77,7 +77,7 @@ internal PasswordHashResource(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysi { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Resource(json); + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource(json); {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PasswordHash.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashListResult.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResourceListResult.PowerShell.cs similarity index 67% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashListResult.PowerShell.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResourceListResult.PowerShell.cs index 792d7284ad1c..4e8be79bbc94 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashListResult.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResourceListResult.PowerShell.cs @@ -7,9 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; - /// List of password hash results - [System.ComponentModel.TypeConverter(typeof(PasswordHashListResultTypeConverter))] - public partial class PasswordHashListResult + /// The response of a PasswordHashResource list operation. + [System.ComponentModel.TypeConverter(typeof(PasswordHashResourceListResultTypeConverter))] + public partial class PasswordHashResourceListResult { /// @@ -63,44 +63,46 @@ public partial class PasswordHashListResult 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.FirmwareAnalysis.Models.IPasswordHashListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new PasswordHashListResult(content); + return new PasswordHashResourceListResult(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.FirmwareAnalysis.Models.IPasswordHashListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new PasswordHashListResult(content); + return new PasswordHashResourceListResult(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// 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.FirmwareAnalysis.Models.IPasswordHashListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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. - internal PasswordHashListResult(global::System.Collections.IDictionary content) + internal PasswordHashResourceListResult(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -111,21 +113,21 @@ internal PasswordHashListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PasswordHashResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PasswordHashResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResultInternal)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. - internal PasswordHashListResult(global::System.Management.Automation.PSObject content) + internal PasswordHashResourceListResult(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -136,11 +138,11 @@ internal PasswordHashListResult(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PasswordHashResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.PasswordHashResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -162,9 +164,9 @@ public override string ToString() return ToJsonString(); } } - /// List of password hash results - [System.ComponentModel.TypeConverter(typeof(PasswordHashListResultTypeConverter))] - public partial interface IPasswordHashListResult + /// The response of a PasswordHashResource list operation. + [System.ComponentModel.TypeConverter(typeof(PasswordHashResourceListResultTypeConverter))] + public partial interface IPasswordHashResourceListResult { diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResourceListResult.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResourceListResult.TypeConverter.cs new file mode 100644 index 000000000000..23287d62fd6e --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResourceListResult.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PasswordHashResourceListResultTypeConverter : 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.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Models.IPasswordHashResourceListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PasswordHashResourceListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PasswordHashResourceListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PasswordHashResourceListResult.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/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashListResult.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResourceListResult.cs similarity index 61% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashListResult.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResourceListResult.cs index 8ff80abe4584..a2e8aa9c2fcf 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashListResult.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResourceListResult.cs @@ -7,70 +7,67 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// List of password hash results - public partial class PasswordHashListResult : - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashListResult, - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashListResultInternal + /// The response of a PasswordHashResource list operation. + public partial class PasswordHashResourceListResult : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResult, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResultInternal { - /// Internal Acessors for Value - System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashListResultInternal.Value { get => this._value; set { {_value = value;} } } - /// Backing field for property. private string _nextLink; - /// The uri to fetch the next page of resources. + /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. private System.Collections.Generic.List _value; - /// The list of password hash results. + /// The PasswordHashResource items on this page [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public System.Collections.Generic.List Value { get => this._value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } - /// Creates an new instance. - public PasswordHashListResult() + /// Creates an new instance. + public PasswordHashResourceListResult() { } } - /// List of password hash results - public partial interface IPasswordHashListResult : + /// The response of a PasswordHashResource list operation. + public partial interface IPasswordHashResourceListResult : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable { - /// The uri to fetch the next page of resources. + /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The uri to fetch the next page of resources.", + Description = @"The link to the next page of items", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] string NextLink { get; set; } - /// The list of password hash results. + /// The PasswordHashResource items on this page [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = true, + Required = true, + ReadOnly = false, Read = true, - Create = false, - Update = false, - Description = @"The list of password hash results.", + Create = true, + Update = true, + Description = @"The PasswordHashResource items on this page", SerializedName = @"value", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResource) })] - System.Collections.Generic.List Value { get; } + System.Collections.Generic.List Value { get; set; } } - /// List of password hash results - internal partial interface IPasswordHashListResultInternal + /// The response of a PasswordHashResource list operation. + internal partial interface IPasswordHashResourceListResultInternal { - /// The uri to fetch the next page of resources. + /// The link to the next page of items string NextLink { get; set; } - /// The list of password hash results. + /// The PasswordHashResource items on this page System.Collections.Generic.List Value { get; set; } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashListResult.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResourceListResult.json.cs similarity index 83% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashListResult.json.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResourceListResult.json.cs index 02f4b9c2d436..ba772ab403ab 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashListResult.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/PasswordHashResourceListResult.json.cs @@ -7,8 +7,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// List of password hash results - public partial class PasswordHashListResult + /// The response of a PasswordHashResource list operation. + public partial class PasswordHashResourceListResult { /// @@ -54,22 +54,22 @@ public partial class PasswordHashListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new PasswordHashListResult(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new PasswordHashResourceListResult(json) : null; } /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject instance to deserialize from. - internal PasswordHashListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) + internal PasswordHashResourceListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -83,13 +83,13 @@ internal PasswordHashListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnaly } /// - /// Serializes this instance of into a . + /// 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 . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode) { @@ -101,17 +101,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) + if (null != this._value) { - if (null != this._value) + var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); - foreach( var __x in this._value ) - { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); - } - container.Add("value",__w); + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); } + container.Add("value",__w); } AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); AfterToJson(ref container); diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/ProxyResource.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/ProxyResource.PowerShell.cs new file mode 100644 index 000000000000..47195d91acc5 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/ProxyResource.PowerShell.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] + public partial class ProxyResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProxyResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProxyResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProxyResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.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.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.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.FirmwareAnalysis.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProxyResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.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.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.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.FirmwareAnalysis.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] + public partial interface IProxyResource + + { + + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceList.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs similarity index 89% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceList.TypeConverter.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs index 47337d760ebd..a09edb4b2b79 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceList.TypeConverter.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs @@ -8,9 +8,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class WorkspaceListTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class ProxyResourceTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class WorkspaceListTypeConverter : global::System.Management.Auto public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -95,31 +95,31 @@ public static bool CanConvertFrom(dynamic sourceValue) /// 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. + /// 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 + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource).IsAssignableFrom(type)) { return sourceValue; } try { - return WorkspaceList.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return ProxyResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorksp } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return WorkspaceList.DeserializeFromPSObject(sourceValue); + return ProxyResource.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return WorkspaceList.DeserializeFromDictionary(sourceValue); + return ProxyResource.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/ProxyResource.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/ProxyResource.cs new file mode 100644 index 000000000000..d53976a86c31 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/ProxyResource.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Resource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ProxyResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + public partial interface IProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResource + { + + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + internal partial interface IProxyResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal + { + + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/ProxyResource.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/ProxyResource.json.cs new file mode 100644 index 000000000000..f787082fae87 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/ProxyResource.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.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.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new ProxyResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject instance to deserialize from. + internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Resource(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Resource.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Resource.cs index b9ac7c3872b1..74f2c1e1f920 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Resource.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Resource.cs @@ -33,6 +33,24 @@ public partial class Resource : /// Internal Acessors for SystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SystemData()); set { {_systemData = value;} } } + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } + /// Internal Acessors for Type string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => this._type; set { {_type = value;} } } @@ -54,27 +72,27 @@ public partial class Resource : /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).CreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).CreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).CreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).LastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).LastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemDataInternal)SystemData).LastModifiedByType; } /// Backing field for property. private string _type; diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponent.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponent.PowerShell.cs index 98cad55efa66..4db1153b5b39 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponent.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponent.PowerShell.cs @@ -129,6 +129,10 @@ internal SbomComponent(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentInternal)this).FilePath = (System.Collections.Generic.List) content.GetValueForProperty("FilePath",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentInternal)this).FilePath, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentInternal)this).ProvisioningState, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -166,6 +170,10 @@ internal SbomComponent(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentInternal)this).FilePath = (System.Collections.Generic.List) content.GetValueForProperty("FilePath",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentInternal)this).FilePath, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentInternal)this).ProvisioningState, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponent.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponent.cs index fd4ea0a9996a..142a2201da47 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponent.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponent.cs @@ -30,7 +30,9 @@ public partial class SbomComponent : /// Backing field for property. private System.Collections.Generic.List _filePath; - /// File paths related to the component. + /// + /// File paths related to the component. Note, relatedFiles should be used instead of this property. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public System.Collections.Generic.List FilePath { get => this._filePath; set => this._filePath = value; } @@ -41,6 +43,16 @@ public partial class SbomComponent : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string License { get => this._license; set => this._license = value; } + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + /// Backing field for property. private string _version; @@ -80,14 +92,16 @@ public partial interface ISbomComponent : SerializedName = @"componentName", PossibleTypes = new [] { typeof(string) })] string ComponentName { get; set; } - /// File paths related to the component. + /// + /// File paths related to the component. Note, relatedFiles should be used instead of this property. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"File paths related to the component.", + Description = @"File paths related to the component. Note, relatedFiles should be used instead of this property.", SerializedName = @"filePaths", PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List FilePath { get; set; } @@ -102,6 +116,18 @@ public partial interface ISbomComponent : SerializedName = @"license", PossibleTypes = new [] { typeof(string) })] string License { get; set; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; } /// Version for the component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -123,10 +149,15 @@ internal partial interface ISbomComponentInternal string ComponentId { get; set; } /// Name for the component. string ComponentName { get; set; } - /// File paths related to the component. + /// + /// File paths related to the component. Note, relatedFiles should be used instead of this property. + /// System.Collections.Generic.List FilePath { get; set; } /// License for the component. string License { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; set; } /// Version for the component. string Version { get; set; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponent.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponent.json.cs index 844832e8e252..aad57729c37b 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponent.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponent.json.cs @@ -82,6 +82,7 @@ internal SbomComponent(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runti {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)_version;} {_license = If( json?.PropertyT("license"), out var __jsonLicense) ? (string)__jsonLicense : (string)_license;} {_filePath = If( json?.PropertyT("filePaths"), out var __jsonFilePaths) ? If( __jsonFilePaths as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _filePath;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} AfterFromJson(json); } @@ -117,6 +118,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode } container.Add("filePaths",__w); } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResource.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResource.PowerShell.cs index e5c6d9ea4689..e5495150dfb8 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResource.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResource.PowerShell.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; - /// SBOM analysis result resource + /// The object representing a firmware analysis SBOM component result resource [System.ComponentModel.TypeConverter(typeof(SbomComponentResourceTypeConverter))] public partial class SbomComponentResource { @@ -153,6 +153,10 @@ internal SbomComponentResource(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } if (content.Contains("ComponentId")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceInternal)this).ComponentId = (string) content.GetValueForProperty("ComponentId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceInternal)this).ComponentId, global::System.Convert.ToString); @@ -234,6 +238,10 @@ internal SbomComponentResource(global::System.Management.Automation.PSObject con { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } if (content.Contains("ComponentId")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceInternal)this).ComponentId = (string) content.GetValueForProperty("ComponentId",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceInternal)this).ComponentId, global::System.Convert.ToString); @@ -274,7 +282,7 @@ public override string ToString() return ToJsonString(); } } - /// SBOM analysis result resource + /// The object representing a firmware analysis SBOM component result resource [System.ComponentModel.TypeConverter(typeof(SbomComponentResourceTypeConverter))] public partial interface ISbomComponentResource diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResource.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResource.cs index 5ba67fabc20d..454bd12f4cba 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResource.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResource.cs @@ -7,16 +7,17 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// SBOM analysis result resource + /// The object representing a firmware analysis SBOM component result resource public partial class SbomComponentResource : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResource, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceInternal, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource(); /// ID for the component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] @@ -26,7 +27,9 @@ public partial class SbomComponentResource : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string ComponentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentInternal)Property).ComponentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentInternal)Property).ComponentName = value ?? null; } - /// File paths related to the component. + /// + /// File paths related to the component. Note, relatedFiles should be used instead of this property. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public System.Collections.Generic.List FilePath { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentInternal)Property).FilePath; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentInternal)Property).FilePath = value ?? null /* arrayOf */; } @@ -34,73 +37,98 @@ public partial class SbomComponentResource : /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id; } /// License for the component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string License { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentInternal)Property).License; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentInternal)Property).License = value ?? null; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name = value ?? null; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type = value ?? null; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponent Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SbomComponent()); set { {_property = value;} } } + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentInternal)Property).ProvisioningState = value ?? null; } + /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponent _property; - /// The properties of an SBOM component found within a firmware image + /// The resource-specific properties for this resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponent Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SbomComponent()); set => this._property = value; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentInternal)Property).ProvisioningState; } + /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; } + internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type; } /// Version for the component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] @@ -120,14 +148,14 @@ public SbomComponentResource() /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); } } - /// SBOM analysis result resource + /// The object representing a firmware analysis SBOM component result resource public partial interface ISbomComponentResource : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResource + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource { /// ID for the component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( @@ -151,14 +179,16 @@ public partial interface ISbomComponentResource : SerializedName = @"componentName", PossibleTypes = new [] { typeof(string) })] string ComponentName { get; set; } - /// File paths related to the component. + /// + /// File paths related to the component. Note, relatedFiles should be used instead of this property. + /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"File paths related to the component.", + Description = @"File paths related to the component. Note, relatedFiles should be used instead of this property.", SerializedName = @"filePaths", PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List FilePath { get; set; } @@ -173,6 +203,18 @@ public partial interface ISbomComponentResource : SerializedName = @"license", PossibleTypes = new [] { typeof(string) })] string License { get; set; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; } /// Version for the component. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, @@ -186,20 +228,25 @@ public partial interface ISbomComponentResource : string Version { get; set; } } - /// SBOM analysis result resource + /// The object representing a firmware analysis SBOM component result resource internal partial interface ISbomComponentResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResourceInternal { /// ID for the component. string ComponentId { get; set; } /// Name for the component. string ComponentName { get; set; } - /// File paths related to the component. + /// + /// File paths related to the component. Note, relatedFiles should be used instead of this property. + /// System.Collections.Generic.List FilePath { get; set; } /// License for the component. string License { get; set; } - /// The properties of an SBOM component found within a firmware image + /// The resource-specific properties for this resource. Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponent Property { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; set; } /// Version for the component. string Version { get; set; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResource.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResource.json.cs index 25de298b2228..336831c6bab5 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResource.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResource.json.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// SBOM analysis result resource + /// The object representing a firmware analysis SBOM component result resource public partial class SbomComponentResource { @@ -77,7 +77,7 @@ internal SbomComponentResource(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalys { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Resource(json); + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource(json); {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SbomComponent.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentListResult.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResourceListResult.PowerShell.cs similarity index 67% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentListResult.PowerShell.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResourceListResult.PowerShell.cs index ae50096473ce..1588c0a95269 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentListResult.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResourceListResult.PowerShell.cs @@ -7,9 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; - /// List of SBOM results. - [System.ComponentModel.TypeConverter(typeof(SbomComponentListResultTypeConverter))] - public partial class SbomComponentListResult + /// The response of a SbomComponentResource list operation. + [System.ComponentModel.TypeConverter(typeof(SbomComponentResourceListResultTypeConverter))] + public partial class SbomComponentResourceListResult { /// @@ -63,44 +63,46 @@ public partial class SbomComponentListResult 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.FirmwareAnalysis.Models.ISbomComponentListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new SbomComponentListResult(content); + return new SbomComponentResourceListResult(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.FirmwareAnalysis.Models.ISbomComponentListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new SbomComponentListResult(content); + return new SbomComponentResourceListResult(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// 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.FirmwareAnalysis.Models.ISbomComponentListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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. - internal SbomComponentListResult(global::System.Collections.IDictionary content) + internal SbomComponentResourceListResult(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -111,21 +113,21 @@ internal SbomComponentListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SbomComponentResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SbomComponentResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResultInternal)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. - internal SbomComponentListResult(global::System.Management.Automation.PSObject content) + internal SbomComponentResourceListResult(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -136,11 +138,11 @@ internal SbomComponentListResult(global::System.Management.Automation.PSObject c // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SbomComponentResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SbomComponentResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -162,9 +164,9 @@ public override string ToString() return ToJsonString(); } } - /// List of SBOM results. - [System.ComponentModel.TypeConverter(typeof(SbomComponentListResultTypeConverter))] - public partial interface ISbomComponentListResult + /// The response of a SbomComponentResource list operation. + [System.ComponentModel.TypeConverter(typeof(SbomComponentResourceListResultTypeConverter))] + public partial interface ISbomComponentResourceListResult { diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentListResult.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResourceListResult.TypeConverter.cs similarity index 84% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentListResult.TypeConverter.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResourceListResult.TypeConverter.cs index cc726080449c..83794eecce0c 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentListResult.TypeConverter.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResourceListResult.TypeConverter.cs @@ -8,9 +8,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class SbomComponentListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class SbomComponentResourceListResultTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class SbomComponentListResultTypeConverter : global::System.Manag public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -95,31 +95,32 @@ public static bool CanConvertFrom(dynamic sourceValue) /// 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. + /// 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 + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResult).IsAssignableFrom(type)) { return sourceValue; } try { - return SbomComponentListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return SbomComponentResourceListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +128,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomCo } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return SbomComponentListResult.DeserializeFromPSObject(sourceValue); + return SbomComponentResourceListResult.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return SbomComponentListResult.DeserializeFromDictionary(sourceValue); + return SbomComponentResourceListResult.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentListResult.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResourceListResult.cs similarity index 62% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentListResult.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResourceListResult.cs index 7fe35f3d66c5..47200bf2679a 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentListResult.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResourceListResult.cs @@ -7,70 +7,67 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// List of SBOM results. - public partial class SbomComponentListResult : - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentListResult, - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentListResultInternal + /// The response of a SbomComponentResource list operation. + public partial class SbomComponentResourceListResult : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResult, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResultInternal { - /// Internal Acessors for Value - System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentListResultInternal.Value { get => this._value; set { {_value = value;} } } - /// Backing field for property. private string _nextLink; - /// The uri to fetch the next page of resources. + /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. private System.Collections.Generic.List _value; - /// The list of SBOM components. + /// The SbomComponentResource items on this page [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public System.Collections.Generic.List Value { get => this._value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } - /// Creates an new instance. - public SbomComponentListResult() + /// Creates an new instance. + public SbomComponentResourceListResult() { } } - /// List of SBOM results. - public partial interface ISbomComponentListResult : + /// The response of a SbomComponentResource list operation. + public partial interface ISbomComponentResourceListResult : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable { - /// The uri to fetch the next page of resources. + /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The uri to fetch the next page of resources.", + Description = @"The link to the next page of items", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] string NextLink { get; set; } - /// The list of SBOM components. + /// The SbomComponentResource items on this page [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = true, + Required = true, + ReadOnly = false, Read = true, - Create = false, - Update = false, - Description = @"The list of SBOM components.", + Create = true, + Update = true, + Description = @"The SbomComponentResource items on this page", SerializedName = @"value", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResource) })] - System.Collections.Generic.List Value { get; } + System.Collections.Generic.List Value { get; set; } } - /// List of SBOM results. - internal partial interface ISbomComponentListResultInternal + /// The response of a SbomComponentResource list operation. + internal partial interface ISbomComponentResourceListResultInternal { - /// The uri to fetch the next page of resources. + /// The link to the next page of items string NextLink { get; set; } - /// The list of SBOM components. + /// The SbomComponentResource items on this page System.Collections.Generic.List Value { get; set; } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentListResult.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResourceListResult.json.cs similarity index 83% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentListResult.json.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResourceListResult.json.cs index 55b80f472c8b..c85501f3cacf 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentListResult.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SbomComponentResourceListResult.json.cs @@ -7,8 +7,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// List of SBOM results. - public partial class SbomComponentListResult + /// The response of a SbomComponentResource list operation. + public partial class SbomComponentResourceListResult { /// @@ -54,22 +54,22 @@ public partial class SbomComponentListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new SbomComponentListResult(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new SbomComponentResourceListResult(json) : null; } /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject instance to deserialize from. - internal SbomComponentListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) + internal SbomComponentResourceListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -83,13 +83,13 @@ internal SbomComponentListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnal } /// - /// Serializes this instance of into a . + /// 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 . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode) { @@ -101,17 +101,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) + if (null != this._value) { - if (null != this._value) + var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); - foreach( var __x in this._value ) - { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); - } - container.Add("value",__w); + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); } + container.Add("value",__w); } AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); AfterToJson(ref container); diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceList.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Sku.PowerShell.cs similarity index 61% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceList.PowerShell.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Sku.PowerShell.cs index 45eacdcb5a9e..0293f6958705 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceList.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Sku.PowerShell.cs @@ -7,9 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; - /// Return a list of firmware analysis workspaces. - [System.ComponentModel.TypeConverter(typeof(WorkspaceListTypeConverter))] - public partial class WorkspaceList + /// The resource model definition representing SKU + [System.ComponentModel.TypeConverter(typeof(SkuTypeConverter))] + public partial class Sku { /// @@ -63,61 +63,44 @@ public partial class WorkspaceList 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.FirmwareAnalysis.Models.IWorkspaceList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISku DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new WorkspaceList(content); + return new Sku(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.FirmwareAnalysis.Models.IWorkspaceList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISku DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new WorkspaceList(content); + return new Sku(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// 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.FirmwareAnalysis.Models.IWorkspaceList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.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(); - } + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISku FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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. - internal WorkspaceList(global::System.Collections.IDictionary content) + internal Sku(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -126,23 +109,35 @@ internal WorkspaceList(global::System.Collections.IDictionary content) return; } // actually deserialize - if (content.Contains("Value")) + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Tier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Tier = (string) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Tier, global::System.Convert.ToString); + } + if (content.Contains("Size")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Size = (string) content.GetValueForProperty("Size",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Size, global::System.Convert.ToString); + } + if (content.Contains("Family")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Family = (string) content.GetValueForProperty("Family",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Family, global::System.Convert.ToString); } - if (content.Contains("NextLink")) + if (content.Contains("Capacity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } 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. - internal WorkspaceList(global::System.Management.Automation.PSObject content) + internal Sku(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -151,20 +146,49 @@ internal WorkspaceList(global::System.Management.Automation.PSObject content) return; } // actually deserialize - if (content.Contains("Value")) + if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Name, global::System.Convert.ToString); } - if (content.Contains("NextLink")) + if (content.Contains("Tier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Tier = (string) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Tier, global::System.Convert.ToString); + } + if (content.Contains("Size")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Size = (string) content.GetValueForProperty("Size",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Size, global::System.Convert.ToString); + } + if (content.Contains("Family")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Family = (string) content.GetValueForProperty("Family",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Family, global::System.Convert.ToString); + } + if (content.Contains("Capacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } 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.FirmwareAnalysis.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(); + } } - /// Return a list of firmware analysis workspaces. - [System.ComponentModel.TypeConverter(typeof(WorkspaceListTypeConverter))] - public partial interface IWorkspaceList + /// The resource model definition representing SKU + [System.ComponentModel.TypeConverter(typeof(SkuTypeConverter))] + public partial interface ISku { diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Sku.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Sku.TypeConverter.cs new file mode 100644 index 000000000000..e457998a63ca --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Sku.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SkuTypeConverter : 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.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Models.ISku ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISku).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Sku.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Sku.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Sku.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/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Sku.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Sku.cs new file mode 100644 index 000000000000..a594e40d0329 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Sku.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.FirmwareAnalysis.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + + /// The resource model definition representing SKU + public partial class Sku : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISku, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal + { + + /// Backing field for property. + private int? _capacity; + + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public int? Capacity { get => this._capacity; set => this._capacity = value; } + + /// Backing field for property. + private string _family; + + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string Family { get => this._family; set => this._family = value; } + + /// Backing field for property. + private string _name; + + /// The name of the SKU. E.g. P3. It is typically a letter+number code + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _size; + + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string Size { get => this._size; set => this._size = value; } + + /// Backing field for property. + private string _tier; + + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string Tier { get => this._tier; set => this._tier = value; } + + /// Creates an new instance. + public Sku() + { + + } + } + /// The resource model definition representing SKU + public partial interface ISku : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable + { + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", + SerializedName = @"capacity", + PossibleTypes = new [] { typeof(int) })] + int? Capacity { get; set; } + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", + SerializedName = @"family", + PossibleTypes = new [] { typeof(string) })] + string Family { get; set; } + /// The name of the SKU. E.g. P3. It is typically a letter+number code + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the SKU. E.g. P3. It is typically a letter+number code", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", + SerializedName = @"size", + PossibleTypes = new [] { typeof(string) })] + string Size { get; set; } + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", + SerializedName = @"tier", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Free", "Basic", "Standard", "Premium")] + string Tier { get; set; } + + } + /// The resource model definition representing SKU + internal partial interface ISkuInternal + + { + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + int? Capacity { get; set; } + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + string Family { get; set; } + /// The name of the SKU. E.g. P3. It is typically a letter+number code + string Name { get; set; } + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + string Size { get; set; } + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Free", "Basic", "Standard", "Premium")] + string Tier { get; set; } + + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Sku.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Sku.json.cs new file mode 100644 index 000000000000..654f1753596c --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Sku.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.FirmwareAnalysis.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + + /// The resource model definition representing SKU + public partial class Sku + { + + /// + /// 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.FirmwareAnalysis.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.FirmwareAnalysis.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.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISku. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISku. + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISku FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new Sku(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject instance to deserialize from. + internal Sku(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_tier = If( json?.PropertyT("tier"), out var __jsonTier) ? (string)__jsonTier : (string)_tier;} + {_size = If( json?.PropertyT("size"), out var __jsonSize) ? (string)__jsonSize : (string)_size;} + {_family = If( json?.PropertyT("family"), out var __jsonFamily) ? (string)__jsonFamily : (string)_family;} + {_capacity = If( json?.PropertyT("capacity"), out var __jsonCapacity) ? (int?)__jsonCapacity : _capacity;} + 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.FirmwareAnalysis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._tier)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._tier.ToString()) : null, "tier" ,container.Add ); + AddIf( null != (((object)this._size)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._size.ToString()) : null, "size" ,container.Add ); + AddIf( null != (((object)this._family)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._family.ToString()) : null, "family" ,container.Add ); + AddIf( null != this._capacity ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((int)this._capacity) : null, "capacity" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResource.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResource.PowerShell.cs index f908cebdcf8a..a2088daa7f8e 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResource.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResource.PowerShell.cs @@ -157,6 +157,10 @@ internal SummaryResource(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceInternal)this).SummaryType = (string) content.GetValueForProperty("SummaryType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceInternal)this).SummaryType, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -222,6 +226,10 @@ internal SummaryResource(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceInternal)this).SummaryType = (string) content.GetValueForProperty("SummaryType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceInternal)this).SummaryType, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResource.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResource.cs index a3760285b1bb..a47d9598d5aa 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResource.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResource.cs @@ -14,47 +14,73 @@ public partial class SummaryResource : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource(); /// /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name = value ?? null; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type = value ?? null; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceProperties Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceProperties()); set { {_property = value;} } } + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)Property).ProvisioningState = value ?? null; } + /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceProperties _property; - /// Properties of an analysis summary. + /// The resource-specific properties for this resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceProperties()); } + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceProperties()); set => this._property = value; } + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)Property).ProvisioningState; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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); } - /// Describes the type of summary. + /// The type of summary. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] public string SummaryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)Property).SummaryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)Property).SummaryType = value ?? null; } @@ -62,37 +88,37 @@ public partial class SummaryResource : /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; } + internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type; } /// Creates an new instance. public SummaryResource() @@ -108,37 +134,52 @@ public SummaryResource() /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); } } /// The object representing a firmware analysis summary resource. public partial interface ISummaryResource : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResource + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource { - /// Describes the type of summary. + /// The status of the last operation. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = true, Read = true, Create = false, Update = false, - Description = @"Describes the type of summary.", + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; } + /// The type of summary. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The type of summary.", SerializedName = @"summaryType", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CVE", "BinaryHardening", "CryptoCertificate", "CryptoKey")] - string SummaryType { get; } + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CommonVulnerabilitiesAndExposures", "BinaryHardening", "CryptoCertificate", "CryptoKey")] + string SummaryType { get; set; } } /// The object representing a firmware analysis summary resource. internal partial interface ISummaryResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResourceInternal { - /// Properties of an analysis summary. + /// The resource-specific properties for this resource. Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceProperties Property { get; set; } - /// Describes the type of summary. - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CVE", "BinaryHardening", "CryptoCertificate", "CryptoKey")] + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; set; } + /// The type of summary. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CommonVulnerabilitiesAndExposures", "BinaryHardening", "CryptoCertificate", "CryptoKey")] string SummaryType { get; set; } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResource.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResource.json.cs index e75b3b41b39a..d77e766a441f 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResource.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResource.json.cs @@ -77,7 +77,7 @@ internal SummaryResource(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Run { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Resource(json); + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource(json); {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -101,11 +101,8 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - __resource?.ToJson(container, serializationMode); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) - { - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningListResult.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceListResult.PowerShell.cs similarity index 75% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningListResult.PowerShell.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceListResult.PowerShell.cs index 9cf16af7916d..e4bbb8fc7bf8 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningListResult.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceListResult.PowerShell.cs @@ -7,9 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; - /// List of binary hardening results. - [System.ComponentModel.TypeConverter(typeof(BinaryHardeningListResultTypeConverter))] - public partial class BinaryHardeningListResult + /// The response of a SummaryResource list operation. + [System.ComponentModel.TypeConverter(typeof(SummaryResourceListResultTypeConverter))] + public partial class SummaryResourceListResult { /// @@ -63,11 +63,44 @@ public partial class BinaryHardeningListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal BinaryHardeningListResult(global::System.Collections.IDictionary content) + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SummaryResourceListResult(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.FirmwareAnalysis.Models.ISummaryResourceListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SummaryResourceListResult(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.FirmwareAnalysis.Models.ISummaryResourceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SummaryResourceListResult(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -78,21 +111,21 @@ internal BinaryHardeningListResult(global::System.Collections.IDictionary conten // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceListResultInternal)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. - internal BinaryHardeningListResult(global::System.Management.Automation.PSObject content) + internal SummaryResourceListResult(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -103,48 +136,15 @@ internal BinaryHardeningListResult(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.BinaryHardeningResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SummaryResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new BinaryHardeningListResult(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.FirmwareAnalysis.Models.IBinaryHardeningListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new BinaryHardeningListResult(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.FirmwareAnalysis.Models.IBinaryHardeningListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(jsonText)); - /// Serializes this instance to a json string. /// a containing this model serialized to JSON text. @@ -162,9 +162,9 @@ public override string ToString() return ToJsonString(); } } - /// List of binary hardening results. - [System.ComponentModel.TypeConverter(typeof(BinaryHardeningListResultTypeConverter))] - public partial interface IBinaryHardeningListResult + /// The response of a SummaryResource list operation. + [System.ComponentModel.TypeConverter(typeof(SummaryResourceListResultTypeConverter))] + public partial interface ISummaryResourceListResult { diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningListResult.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceListResult.TypeConverter.cs similarity index 88% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningListResult.TypeConverter.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceListResult.TypeConverter.cs index 59e5039abfbf..a63bad95657c 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/BinaryHardeningListResult.TypeConverter.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceListResult.TypeConverter.cs @@ -8,9 +8,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class BinaryHardeningListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class SummaryResourceListResultTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class BinaryHardeningListResultTypeConverter : global::System.Man public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -95,31 +95,31 @@ public static bool CanConvertFrom(dynamic sourceValue) /// 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. + /// 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 + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceListResult).IsAssignableFrom(type)) { return sourceValue; } try { - return BinaryHardeningListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return SummaryResourceListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinary } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return BinaryHardeningListResult.DeserializeFromPSObject(sourceValue); + return SummaryResourceListResult.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return BinaryHardeningListResult.DeserializeFromDictionary(sourceValue); + return SummaryResourceListResult.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryListResult.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceListResult.cs similarity index 63% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryListResult.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceListResult.cs index 7c4a200912dd..5a236d923448 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryListResult.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceListResult.cs @@ -7,70 +7,67 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// List of analysis summaries. - public partial class SummaryListResult : - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryListResult, - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryListResultInternal + /// The response of a SummaryResource list operation. + public partial class SummaryResourceListResult : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceListResult, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceListResultInternal { - /// Internal Acessors for Value - System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryListResultInternal.Value { get => this._value; set { {_value = value;} } } - /// Backing field for property. private string _nextLink; - /// The uri to fetch the next page of resources. + /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. private System.Collections.Generic.List _value; - /// The list of summaries. + /// The SummaryResource items on this page [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public System.Collections.Generic.List Value { get => this._value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } - /// Creates an new instance. - public SummaryListResult() + /// Creates an new instance. + public SummaryResourceListResult() { } } - /// List of analysis summaries. - public partial interface ISummaryListResult : + /// The response of a SummaryResource list operation. + public partial interface ISummaryResourceListResult : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable { - /// The uri to fetch the next page of resources. + /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The uri to fetch the next page of resources.", + Description = @"The link to the next page of items", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] string NextLink { get; set; } - /// The list of summaries. + /// The SummaryResource items on this page [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = true, + Required = true, + ReadOnly = false, Read = true, - Create = false, - Update = false, - Description = @"The list of summaries.", + Create = true, + Update = true, + Description = @"The SummaryResource items on this page", SerializedName = @"value", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResource) })] - System.Collections.Generic.List Value { get; } + System.Collections.Generic.List Value { get; set; } } - /// List of analysis summaries. - internal partial interface ISummaryListResultInternal + /// The response of a SummaryResource list operation. + internal partial interface ISummaryResourceListResultInternal { - /// The uri to fetch the next page of resources. + /// The link to the next page of items string NextLink { get; set; } - /// The list of summaries. + /// The SummaryResource items on this page System.Collections.Generic.List Value { get; set; } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryListResult.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceListResult.json.cs similarity index 83% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryListResult.json.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceListResult.json.cs index b2fcfe516b16..8a3bdd3ca32a 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryListResult.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceListResult.json.cs @@ -7,8 +7,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// List of analysis summaries. - public partial class SummaryListResult + /// The response of a SummaryResource list operation. + public partial class SummaryResourceListResult { /// @@ -54,22 +54,22 @@ public partial class SummaryListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourceListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new SummaryListResult(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new SummaryResourceListResult(json) : null; } /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject instance to deserialize from. - internal SummaryListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) + internal SummaryResourceListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -83,13 +83,13 @@ internal SummaryListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.R } /// - /// Serializes this instance of into a . + /// 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 . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode) { @@ -101,17 +101,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) + if (null != this._value) { - if (null != this._value) + var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); - foreach( var __x in this._value ) - { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); - } - container.Add("value",__w); + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); } + container.Add("value",__w); } AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); AfterToJson(ref container); diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceProperties.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceProperties.PowerShell.cs index 9a6b08772061..93252d615686 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceProperties.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceProperties.PowerShell.cs @@ -113,6 +113,10 @@ internal SummaryResourceProperties(global::System.Collections.IDictionary conten { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType = (string) content.GetValueForProperty("SummaryType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -134,6 +138,10 @@ internal SummaryResourceProperties(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType = (string) content.GetValueForProperty("SummaryType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).SummaryType, global::System.Convert.ToString); } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceProperties.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceProperties.cs index 61cec4f751c7..90dd85e4283e 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceProperties.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceProperties.cs @@ -13,10 +13,20 @@ public partial class SummaryResourceProperties : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal { + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResourcePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + /// Backing field for property. private string _summaryType; - /// Describes the type of summary. + /// The type of summary. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string SummaryType { get => this._summaryType; set => this._summaryType = value; } @@ -30,17 +40,29 @@ public SummaryResourceProperties() public partial interface ISummaryResourceProperties : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable { - /// Describes the type of summary. + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; } + /// The type of summary. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = true, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Describes the type of summary.", + Description = @"The type of summary.", SerializedName = @"summaryType", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CVE", "BinaryHardening", "CryptoCertificate", "CryptoKey")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CommonVulnerabilitiesAndExposures", "BinaryHardening", "CryptoCertificate", "CryptoKey")] string SummaryType { get; set; } } @@ -48,8 +70,11 @@ public partial interface ISummaryResourceProperties : internal partial interface ISummaryResourcePropertiesInternal { - /// Describes the type of summary. - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CVE", "BinaryHardening", "CryptoCertificate", "CryptoKey")] + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; set; } + /// The type of summary. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CommonVulnerabilitiesAndExposures", "BinaryHardening", "CryptoCertificate", "CryptoKey")] string SummaryType { get; set; } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceProperties.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceProperties.json.cs index 1d6c3f689b67..1972503ed722 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceProperties.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/SummaryResourceProperties.json.cs @@ -72,14 +72,6 @@ public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummar switch ( json.StringProperty("summaryType") ) { - case "Firmware": - { - return new FirmwareSummary(json); - } - case "CVE": - { - return new CveSummary(json); - } case "BinaryHardening": { return new BinaryHardeningSummaryResource(json); @@ -92,6 +84,14 @@ public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummar { return new CryptoKeySummaryResource(json); } + case "CommonVulnerabilitiesAndExposures": + { + return new CveSummary(json); + } + case "Firmware": + { + return new FirmwareSummary(json); + } } return new SummaryResourceProperties(json); } @@ -109,6 +109,7 @@ internal SummaryResourceProperties(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAn return; } {_summaryType = If( json?.PropertyT("summaryType"), out var __jsonSummaryType) ? (string)__jsonSummaryType : (string)_summaryType;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} AfterFromJson(json); } @@ -132,6 +133,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode return container; } AddIf( null != (((object)this._summaryType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._summaryType.ToString()) : null, "summaryType" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/TrackedResource.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/TrackedResource.cs index 3b361d5a50a0..5426f27be679 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/TrackedResource.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/TrackedResource.cs @@ -34,16 +34,34 @@ public partial class TrackedResource : public string Location { get => this._location; set => this._location = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Name = value ?? null; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).Type = value ?? null; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] @@ -53,31 +71,31 @@ public partial class TrackedResource : /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; } + internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemData = value ?? null /* model class */; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataCreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ITrackedResourceTags _tag; @@ -117,7 +135,7 @@ public partial interface ITrackedResource : { /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = true, + Required = false, ReadOnly = false, Read = true, Create = true, diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetric.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetric.PowerShell.cs new file mode 100644 index 000000000000..0dadefc6baa4 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetric.PowerShell.cs @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + + /// + /// The object representing how many firmwares the user has uploaded to the workspace. + /// + [System.ComponentModel.TypeConverter(typeof(UsageMetricTypeConverter))] + public partial class UsageMetric + { + + /// + /// 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.FirmwareAnalysis.Models.IUsageMetric DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UsageMetric(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.FirmwareAnalysis.Models.IUsageMetric DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UsageMetric(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.FirmwareAnalysis.Models.IUsageMetric FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.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(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UsageMetric(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.FirmwareAnalysis.Models.IUsageMetricInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UsageMetricPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.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.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.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.FirmwareAnalysis.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("MonthlyFirmwareUploadCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricInternal)this).MonthlyFirmwareUploadCount = (long?) content.GetValueForProperty("MonthlyFirmwareUploadCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricInternal)this).MonthlyFirmwareUploadCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("TotalFirmwareCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricInternal)this).TotalFirmwareCount = (long?) content.GetValueForProperty("TotalFirmwareCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricInternal)this).TotalFirmwareCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UsageMetric(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.FirmwareAnalysis.Models.IUsageMetricInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UsageMetricPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.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.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.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.FirmwareAnalysis.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("MonthlyFirmwareUploadCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricInternal)this).MonthlyFirmwareUploadCount = (long?) content.GetValueForProperty("MonthlyFirmwareUploadCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricInternal)this).MonthlyFirmwareUploadCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("TotalFirmwareCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricInternal)this).TotalFirmwareCount = (long?) content.GetValueForProperty("TotalFirmwareCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricInternal)this).TotalFirmwareCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + AfterDeserializePSObject(content); + } + } + /// The object representing how many firmwares the user has uploaded to the workspace. + [System.ComponentModel.TypeConverter(typeof(UsageMetricTypeConverter))] + public partial interface IUsageMetric + + { + + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareList.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetric.TypeConverter.cs similarity index 86% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareList.TypeConverter.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetric.TypeConverter.cs index 6913808e2a49..0d4770c58a6c 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/FirmwareList.TypeConverter.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetric.TypeConverter.cs @@ -8,9 +8,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class FirmwareListTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class UsageMetricTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class FirmwareListTypeConverter : global::System.Management.Autom public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -95,31 +95,31 @@ public static bool CanConvertFrom(dynamic sourceValue) /// 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. + /// 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 + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetric ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetric).IsAssignableFrom(type)) { return sourceValue; } try { - return FirmwareList.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return UsageMetric.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwa } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return FirmwareList.DeserializeFromPSObject(sourceValue); + return UsageMetric.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return FirmwareList.DeserializeFromDictionary(sourceValue); + return UsageMetric.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetric.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetric.cs new file mode 100644 index 000000000000..204266bce4bc --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetric.cs @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + + /// + /// The object representing how many firmwares the user has uploaded to the workspace. + /// + public partial class UsageMetric : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetric, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricInternal, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type = value ?? null; } + + /// Internal Acessors for MonthlyFirmwareUploadCount + long? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricInternal.MonthlyFirmwareUploadCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)Property).MonthlyFirmwareUploadCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)Property).MonthlyFirmwareUploadCount = value ?? default(long); } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricProperties Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UsageMetricProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for TotalFirmwareCount + long? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricInternal.TotalFirmwareCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)Property).TotalFirmwareCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)Property).TotalFirmwareCount = value ?? default(long); } + + /// + /// The number of firmware analysis jobs that have been submitted in the current month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public long? MonthlyFirmwareUploadCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)Property).MonthlyFirmwareUploadCount; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UsageMetricProperties()); set => this._property = value; } + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } + + /// The total number of firmwares that are in the workspace. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public long? TotalFirmwareCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)Property).TotalFirmwareCount; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public UsageMetric() + { + + } + + /// 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.FirmwareAnalysis.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// The object representing how many firmwares the user has uploaded to the workspace. + public partial interface IUsageMetric : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResource + { + /// + /// The number of firmware analysis jobs that have been submitted in the current month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The number of firmware analysis jobs that have been submitted in the current month.", + SerializedName = @"monthlyFirmwareUploadCount", + PossibleTypes = new [] { typeof(long) })] + long? MonthlyFirmwareUploadCount { get; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; } + /// The total number of firmwares that are in the workspace. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total number of firmwares that are in the workspace.", + SerializedName = @"totalFirmwareCount", + PossibleTypes = new [] { typeof(long) })] + long? TotalFirmwareCount { get; } + + } + /// The object representing how many firmwares the user has uploaded to the workspace. + internal partial interface IUsageMetricInternal : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IProxyResourceInternal + { + /// + /// The number of firmware analysis jobs that have been submitted in the current month. + /// + long? MonthlyFirmwareUploadCount { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricProperties Property { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; set; } + /// The total number of firmwares that are in the workspace. + long? TotalFirmwareCount { get; set; } + + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateDefinition.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetric.json.cs similarity index 84% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateDefinition.json.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetric.json.cs index d8afdf780287..d77490e3ef1f 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateDefinition.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetric.json.cs @@ -7,8 +7,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// Firmware analysis workspace. - public partial class WorkspaceUpdateDefinition + /// + /// The object representing how many firmwares the user has uploaded to the workspace. + /// + public partial class UsageMetric { /// @@ -54,25 +56,25 @@ public partial class WorkspaceUpdateDefinition partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetric. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetric. /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetric FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new WorkspaceUpdateDefinition(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new UsageMetric(json) : null; } /// - /// Serializes this instance of into a . + /// 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 . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode) { @@ -84,16 +86,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; } /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject instance to deserialize from. - internal WorkspaceUpdateDefinition(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) + internal UsageMetric(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -101,7 +104,8 @@ internal WorkspaceUpdateDefinition(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAn { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceProperties.FromJson(__jsonProperties) : _property;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UsageMetricProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricListResult.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricListResult.PowerShell.cs new file mode 100644 index 000000000000..5ac1aa585e79 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + + /// The response of a UsageMetric list operation. + [System.ComponentModel.TypeConverter(typeof(UsageMetricListResultTypeConverter))] + public partial class UsageMetricListResult + { + + /// + /// 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.FirmwareAnalysis.Models.IUsageMetricListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UsageMetricListResult(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.FirmwareAnalysis.Models.IUsageMetricListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UsageMetricListResult(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.FirmwareAnalysis.Models.IUsageMetricListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.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(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UsageMetricListResult(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.FirmwareAnalysis.Models.IUsageMetricListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UsageMetricTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UsageMetricListResult(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.FirmwareAnalysis.Models.IUsageMetricListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UsageMetricTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// The response of a UsageMetric list operation. + [System.ComponentModel.TypeConverter(typeof(UsageMetricListResultTypeConverter))] + public partial interface IUsageMetricListResult + + { + + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricListResult.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricListResult.TypeConverter.cs new file mode 100644 index 000000000000..5f045120c846 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricListResult.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.FirmwareAnalysis.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UsageMetricListResultTypeConverter : 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.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Models.IUsageMetricListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UsageMetricListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UsageMetricListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UsageMetricListResult.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/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricListResult.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricListResult.cs new file mode 100644 index 000000000000..eea3927c102b --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + + /// The response of a UsageMetric list operation. + public partial class UsageMetricListResult : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricListResult, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The UsageMetric items on this page + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public UsageMetricListResult() + { + + } + } + /// The response of a UsageMetric list operation. + public partial interface IUsageMetricListResult : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The UsageMetric items on this page + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The UsageMetric items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetric) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a UsageMetric list operation. + internal partial interface IUsageMetricListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The UsageMetric items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricListResult.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricListResult.json.cs new file mode 100644 index 000000000000..fc360fda603c --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + + /// The response of a UsageMetric list operation. + public partial class UsageMetricListResult + { + + /// + /// 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.FirmwareAnalysis.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.FirmwareAnalysis.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.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new UsageMetricListResult(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.FirmwareAnalysis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject instance to deserialize from. + internal UsageMetricListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetric) (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.UsageMetric.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricProperties.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricProperties.PowerShell.cs new file mode 100644 index 000000000000..628c3bf2a1c9 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricProperties.PowerShell.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.FirmwareAnalysis.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + + /// Properties of a workspaces usage metrics. + [System.ComponentModel.TypeConverter(typeof(UsageMetricPropertiesTypeConverter))] + public partial class UsageMetricProperties + { + + /// + /// 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.FirmwareAnalysis.Models.IUsageMetricProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UsageMetricProperties(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.FirmwareAnalysis.Models.IUsageMetricProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UsageMetricProperties(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.FirmwareAnalysis.Models.IUsageMetricProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.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(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UsageMetricProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MonthlyFirmwareUploadCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)this).MonthlyFirmwareUploadCount = (long?) content.GetValueForProperty("MonthlyFirmwareUploadCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)this).MonthlyFirmwareUploadCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("TotalFirmwareCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)this).TotalFirmwareCount = (long?) content.GetValueForProperty("TotalFirmwareCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)this).TotalFirmwareCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)this).ProvisioningState, 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 UsageMetricProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MonthlyFirmwareUploadCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)this).MonthlyFirmwareUploadCount = (long?) content.GetValueForProperty("MonthlyFirmwareUploadCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)this).MonthlyFirmwareUploadCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("TotalFirmwareCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)this).TotalFirmwareCount = (long?) content.GetValueForProperty("TotalFirmwareCount",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)this).TotalFirmwareCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// Properties of a workspaces usage metrics. + [System.ComponentModel.TypeConverter(typeof(UsageMetricPropertiesTypeConverter))] + public partial interface IUsageMetricProperties + + { + + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricProperties.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricProperties.TypeConverter.cs new file mode 100644 index 000000000000..11caa4683852 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricProperties.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.FirmwareAnalysis.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UsageMetricPropertiesTypeConverter : 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.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Models.IUsageMetricProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UsageMetricProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UsageMetricProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UsageMetricProperties.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/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricProperties.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricProperties.cs new file mode 100644 index 000000000000..92458c7fa25c --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricProperties.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.FirmwareAnalysis.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + + /// Properties of a workspaces usage metrics. + public partial class UsageMetricProperties : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricProperties, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal + { + + /// Internal Acessors for MonthlyFirmwareUploadCount + long? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal.MonthlyFirmwareUploadCount { get => this._monthlyFirmwareUploadCount; set { {_monthlyFirmwareUploadCount = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for TotalFirmwareCount + long? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricPropertiesInternal.TotalFirmwareCount { get => this._totalFirmwareCount; set { {_totalFirmwareCount = value;} } } + + /// Backing field for property. + private long? _monthlyFirmwareUploadCount; + + /// + /// The number of firmware analysis jobs that have been submitted in the current month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public long? MonthlyFirmwareUploadCount { get => this._monthlyFirmwareUploadCount; } + + /// Backing field for property. + private string _provisioningState; + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private long? _totalFirmwareCount; + + /// The total number of firmwares that are in the workspace. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public long? TotalFirmwareCount { get => this._totalFirmwareCount; } + + /// Creates an new instance. + public UsageMetricProperties() + { + + } + } + /// Properties of a workspaces usage metrics. + public partial interface IUsageMetricProperties : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable + { + /// + /// The number of firmware analysis jobs that have been submitted in the current month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The number of firmware analysis jobs that have been submitted in the current month.", + SerializedName = @"monthlyFirmwareUploadCount", + PossibleTypes = new [] { typeof(long) })] + long? MonthlyFirmwareUploadCount { get; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; } + /// The total number of firmwares that are in the workspace. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total number of firmwares that are in the workspace.", + SerializedName = @"totalFirmwareCount", + PossibleTypes = new [] { typeof(long) })] + long? TotalFirmwareCount { get; } + + } + /// Properties of a workspaces usage metrics. + internal partial interface IUsageMetricPropertiesInternal + + { + /// + /// The number of firmware analysis jobs that have been submitted in the current month. + /// + long? MonthlyFirmwareUploadCount { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] + string ProvisioningState { get; set; } + /// The total number of firmwares that are in the workspace. + long? TotalFirmwareCount { get; set; } + + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricProperties.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricProperties.json.cs new file mode 100644 index 000000000000..63cce831f279 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/UsageMetricProperties.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + + /// Properties of a workspaces usage metrics. + public partial class UsageMetricProperties + { + + /// + /// 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.FirmwareAnalysis.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.FirmwareAnalysis.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.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetricProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new UsageMetricProperties(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.FirmwareAnalysis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._monthlyFirmwareUploadCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._monthlyFirmwareUploadCount) : null, "monthlyFirmwareUploadCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._totalFirmwareCount ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNumber((long)this._totalFirmwareCount) : null, "totalFirmwareCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject instance to deserialize from. + internal UsageMetricProperties(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_monthlyFirmwareUploadCount = If( json?.PropertyT("monthlyFirmwareUploadCount"), out var __jsonMonthlyFirmwareUploadCount) ? (long?)__jsonMonthlyFirmwareUploadCount : _monthlyFirmwareUploadCount;} + {_totalFirmwareCount = If( json?.PropertyT("totalFirmwareCount"), out var __jsonTotalFirmwareCount) ? (long?)__jsonTotalFirmwareCount : _totalFirmwareCount;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Workspace.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Workspace.PowerShell.cs index c2bfc1b37af5..27a24fe9123c 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Workspace.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Workspace.PowerShell.cs @@ -130,6 +130,10 @@ internal Workspace(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspacePropertiesTypeConverter.ConvertFrom); } + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SkuTypeConverter.ConvertFrom); + } if (content.Contains("SystemDataCreatedBy")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); @@ -182,6 +186,26 @@ internal Workspace(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).ProvisioningState, global::System.Convert.ToString); } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuTier = (string) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuTier, global::System.Convert.ToString); + } + if (content.Contains("SkuSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuSize, global::System.Convert.ToString); + } + if (content.Contains("SkuFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuFamily, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } AfterDeserializeDictionary(content); } @@ -203,6 +227,10 @@ internal Workspace(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspacePropertiesTypeConverter.ConvertFrom); } + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.SkuTypeConverter.ConvertFrom); + } if (content.Contains("SystemDataCreatedBy")) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); @@ -255,6 +283,26 @@ internal Workspace(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).ProvisioningState, global::System.Convert.ToString); } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuTier = (string) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuTier, global::System.Convert.ToString); + } + if (content.Contains("SkuSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuSize, global::System.Convert.ToString); + } + if (content.Contains("SkuFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuFamily, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } AfterDeserializePSObject(content); } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Workspace.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Workspace.cs index cb3aa84f2c47..f6132fa8c02a 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Workspace.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Workspace.cs @@ -27,25 +27,46 @@ public partial class Workspace : /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ITrackedResourceInternal)__trackedResource).Location = value ; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ITrackedResourceInternal)__trackedResource).Location = value ?? null; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).Name = value ?? null; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).Type = value ?? null; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceProperties Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspacePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspacePropertiesInternal)Property).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspacePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspacePropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for Sku + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISku Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Sku()); set { {_sku = value;} } } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] @@ -54,7 +75,7 @@ public partial class Workspace : /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceProperties _property; - /// Workspace properties. + /// The resource-specific properties for this resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceProperties()); set => this._property = value; } @@ -66,35 +87,72 @@ public partial class Workspace : [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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); } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISku _sku; + + /// The SKU (Stock Keeping Unit) assigned to this resource. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Sku()); set => this._sku = value; } + + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)Sku).Capacity = value ?? default(int); } + + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)Sku).Family; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)Sku).Family = value ?? null; } + + /// The name of the SKU. E.g. P3. It is typically a letter+number code + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)Sku).Name = value ?? null; } + + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)Sku).Size; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)Sku).Size = value ?? null; } + + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISkuInternal)Sku).Tier = value ?? null; } + /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemData; } + internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemData = value ?? null /* model class */; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? null; } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? null; } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; } /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inherited)] @@ -139,19 +197,108 @@ public partial interface IWorkspace : Description = @"Provisioning state of the resource.", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Canceled", "Failed")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] string ProvisioningState { get; } + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", + SerializedName = @"capacity", + PossibleTypes = new [] { typeof(int) })] + int? SkuCapacity { get; set; } + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", + SerializedName = @"family", + PossibleTypes = new [] { typeof(string) })] + string SkuFamily { get; set; } + /// The name of the SKU. E.g. P3. It is typically a letter+number code + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the SKU. E.g. P3. It is typically a letter+number code", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string SkuName { get; set; } + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", + SerializedName = @"size", + PossibleTypes = new [] { typeof(string) })] + string SkuSize { get; set; } + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", + SerializedName = @"tier", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Free", "Basic", "Standard", "Premium")] + string SkuTier { get; set; } } /// Firmware analysis workspace. internal partial interface IWorkspaceInternal : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ITrackedResourceInternal { - /// Workspace properties. + /// The resource-specific properties for this resource. Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceProperties Property { get; set; } /// Provisioning state of the resource. - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Canceled", "Failed")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] string ProvisioningState { get; set; } + /// The SKU (Stock Keeping Unit) assigned to this resource. + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISku Sku { get; set; } + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + int? SkuCapacity { get; set; } + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + string SkuFamily { get; set; } + /// The name of the SKU. E.g. P3. It is typically a letter+number code + string SkuName { get; set; } + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + string SkuSize { get; set; } + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Free", "Basic", "Standard", "Premium")] + string SkuTier { get; set; } } } \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Workspace.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Workspace.json.cs index e5050e7e4a71..2d59ed1ee8b3 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Workspace.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/Workspace.json.cs @@ -86,6 +86,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode } __trackedResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != this._sku ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._sku.ToJson(null,serializationMode) : null, "sku" ,container.Add ); AfterToJson(ref container); return container; } @@ -104,6 +105,7 @@ internal Workspace(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.J } __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.TrackedResource(json); {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceProperties.FromJson(__jsonProperties) : _property;} + {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Sku.FromJson(__jsonSku) : _sku;} AfterFromJson(json); } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyListResult.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceListResult.PowerShell.cs similarity index 76% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyListResult.PowerShell.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceListResult.PowerShell.cs index 8bd15967aba1..4c720a01e1a4 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyListResult.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceListResult.PowerShell.cs @@ -7,9 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; - /// List of crypto keys. - [System.ComponentModel.TypeConverter(typeof(CryptoKeyListResultTypeConverter))] - public partial class CryptoKeyListResult + /// The response of a Workspace list operation. + [System.ComponentModel.TypeConverter(typeof(WorkspaceListResultTypeConverter))] + public partial class WorkspaceListResult { /// @@ -63,11 +63,61 @@ public partial class CryptoKeyListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal CryptoKeyListResult(global::System.Collections.IDictionary content) + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new WorkspaceListResult(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.FirmwareAnalysis.Models.IWorkspaceListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new WorkspaceListResult(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.FirmwareAnalysis.Models.IWorkspaceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.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(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal WorkspaceListResult(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -78,21 +128,21 @@ internal CryptoKeyListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoKeyResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResultInternal)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. - internal CryptoKeyListResult(global::System.Management.Automation.PSObject content) + internal WorkspaceListResult(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -103,68 +153,18 @@ internal CryptoKeyListResult(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.CryptoKeyResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new CryptoKeyListResult(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.FirmwareAnalysis.Models.ICryptoKeyListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new CryptoKeyListResult(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.FirmwareAnalysis.Models.ICryptoKeyListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.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(); - } } - /// List of crypto keys. - [System.ComponentModel.TypeConverter(typeof(CryptoKeyListResultTypeConverter))] - public partial interface ICryptoKeyListResult + /// The response of a Workspace list operation. + [System.ComponentModel.TypeConverter(typeof(WorkspaceListResultTypeConverter))] + public partial interface IWorkspaceListResult { diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyListResult.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceListResult.TypeConverter.cs similarity index 88% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyListResult.TypeConverter.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceListResult.TypeConverter.cs index 8691e57d4cd3..4b954157b36c 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CryptoKeyListResult.TypeConverter.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceListResult.TypeConverter.cs @@ -8,9 +8,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class CryptoKeyListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class WorkspaceListResultTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class CryptoKeyListResultTypeConverter : global::System.Managemen public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -95,31 +95,31 @@ public static bool CanConvertFrom(dynamic sourceValue) /// 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. + /// 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 + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResult).IsAssignableFrom(type)) { return sourceValue; } try { - return CryptoKeyListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return WorkspaceListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICrypto } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return CryptoKeyListResult.DeserializeFromPSObject(sourceValue); + return WorkspaceListResult.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return CryptoKeyListResult.DeserializeFromDictionary(sourceValue); + return WorkspaceListResult.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceList.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceListResult.cs similarity index 60% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceList.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceListResult.cs index 0412ff801d1f..753ac31a88a7 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceList.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceListResult.cs @@ -7,70 +7,67 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// Return a list of firmware analysis workspaces. - public partial class WorkspaceList : - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceList, - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListInternal + /// The response of a Workspace list operation. + public partial class WorkspaceListResult : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResult, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResultInternal { - /// Internal Acessors for Value - System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListInternal.Value { get => this._value; set { {_value = value;} } } - /// Backing field for property. private string _nextLink; - /// The uri to fetch the next page of asset. + /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. private System.Collections.Generic.List _value; - /// The list of firmware analysis workspaces. + /// The Workspace items on this page [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - public System.Collections.Generic.List Value { get => this._value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } - /// Creates an new instance. - public WorkspaceList() + /// Creates an new instance. + public WorkspaceListResult() { } } - /// Return a list of firmware analysis workspaces. - public partial interface IWorkspaceList : + /// The response of a Workspace list operation. + public partial interface IWorkspaceListResult : Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable { - /// The uri to fetch the next page of asset. + /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The uri to fetch the next page of asset.", + Description = @"The link to the next page of items", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] string NextLink { get; set; } - /// The list of firmware analysis workspaces. + /// The Workspace items on this page [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = true, + Required = true, + ReadOnly = false, Read = true, - Create = false, - Update = false, - Description = @"The list of firmware analysis workspaces.", + Create = true, + Update = true, + Description = @"The Workspace items on this page", SerializedName = @"value", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspace) })] - System.Collections.Generic.List Value { get; } + System.Collections.Generic.List Value { get; set; } } - /// Return a list of firmware analysis workspaces. - internal partial interface IWorkspaceListInternal + /// The response of a Workspace list operation. + internal partial interface IWorkspaceListResultInternal { - /// The uri to fetch the next page of asset. + /// The link to the next page of items string NextLink { get; set; } - /// The list of firmware analysis workspaces. + /// The Workspace items on this page System.Collections.Generic.List Value { get; set; } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceList.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceListResult.json.cs similarity index 84% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceList.json.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceListResult.json.cs index 9a6cade82905..c5c089f28c05 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceList.json.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceListResult.json.cs @@ -7,8 +7,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - /// Return a list of firmware analysis workspaces. - public partial class WorkspaceList + /// The response of a Workspace list operation. + public partial class WorkspaceListResult { /// @@ -54,25 +54,25 @@ public partial class WorkspaceList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceList FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new WorkspaceList(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new WorkspaceListResult(json) : null; } /// - /// Serializes this instance of into a . + /// 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 . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode) { @@ -84,17 +84,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeRead)) + if (null != this._value) { - if (null != this._value) + var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.XNodeArray(); - foreach( var __x in this._value ) - { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); - } - container.Add("value",__w); + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); } + container.Add("value",__w); } AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); AfterToJson(ref container); @@ -102,10 +99,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode } /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject instance to deserialize from. - internal WorkspaceList(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) + internal WorkspaceListResult(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceProperties.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceProperties.cs index 12e77326d843..f92dfa5e8865 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceProperties.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceProperties.cs @@ -43,7 +43,7 @@ public partial interface IWorkspaceProperties : Description = @"Provisioning state of the resource.", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Canceled", "Failed")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] string ProvisioningState { get; } } @@ -52,7 +52,7 @@ internal partial interface IWorkspacePropertiesInternal { /// Provisioning state of the resource. - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Canceled", "Failed")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Pending", "Extracting", "Analyzing")] string ProvisioningState { get; set; } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdate.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdate.PowerShell.cs new file mode 100644 index 000000000000..10d370086ecb --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdate.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + + /// The type used for update operations of the Workspace. + [System.ComponentModel.TypeConverter(typeof(WorkspaceUpdateTypeConverter))] + public partial class WorkspaceUpdate + { + + /// + /// 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.FirmwareAnalysis.Models.IWorkspaceUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new WorkspaceUpdate(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.FirmwareAnalysis.Models.IWorkspaceUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new WorkspaceUpdate(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.FirmwareAnalysis.Models.IWorkspaceUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.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(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal WorkspaceUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdate) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.AzureResourceManagerCommonTypesSkuUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceUpdateTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuTier = (string) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuTier, global::System.Convert.ToString); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuSize, global::System.Convert.ToString); + } + if (content.Contains("SkuFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuFamily, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal WorkspaceUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdate) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.AzureResourceManagerCommonTypesSkuUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceUpdateTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuTier = (string) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuTier, global::System.Convert.ToString); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuSize, global::System.Convert.ToString); + } + if (content.Contains("SkuFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuFamily, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + } + /// The type used for update operations of the Workspace. + [System.ComponentModel.TypeConverter(typeof(WorkspaceUpdateTypeConverter))] + public partial interface IWorkspaceUpdate + + { + + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveListResult.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdate.TypeConverter.cs similarity index 86% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveListResult.TypeConverter.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdate.TypeConverter.cs index 87eba1eb03f6..679de7d711bf 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/CveListResult.TypeConverter.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdate.TypeConverter.cs @@ -8,9 +8,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class CveListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class WorkspaceUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class CveListResultTypeConverter : global::System.Management.Auto public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -95,31 +95,31 @@ public static bool CanConvertFrom(dynamic sourceValue) /// 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. + /// 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 + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdate).IsAssignableFrom(type)) { return sourceValue; } try { - return CveListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return WorkspaceUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveLis } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return CveListResult.DeserializeFromPSObject(sourceValue); + return WorkspaceUpdate.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return CveListResult.DeserializeFromDictionary(sourceValue); + return WorkspaceUpdate.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdate.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdate.cs new file mode 100644 index 000000000000..15e3bc7584dd --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdate.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + + /// The type used for update operations of the Workspace. + public partial class WorkspaceUpdate : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdate, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal + { + + /// Internal Acessors for Sku + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdate Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.AzureResourceManagerCommonTypesSkuUpdate()); set { {_sku = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdate _sku; + + /// The SKU (Stock Keeping Unit) assigned to this resource. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdate Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.AzureResourceManagerCommonTypesSkuUpdate()); set => this._sku = value; } + + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)Sku).Capacity = value ?? default(int); } + + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)Sku).Family; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)Sku).Family = value ?? null; } + + /// The name of the SKU. Ex - P3. It is typically a letter+number code + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)Sku).Name = value ?? null; } + + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)Sku).Size; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)Sku).Size = value ?? null; } + + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] + public string SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdateInternal)Sku).Tier = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceUpdateTags()); set => this._tag = value; } + + /// Creates an new instance. + public WorkspaceUpdate() + { + + } + } + /// The type used for update operations of the Workspace. + public partial interface IWorkspaceUpdate : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable + { + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", + SerializedName = @"capacity", + PossibleTypes = new [] { typeof(int) })] + int? SkuCapacity { get; set; } + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", + SerializedName = @"family", + PossibleTypes = new [] { typeof(string) })] + string SkuFamily { get; set; } + /// The name of the SKU. Ex - P3. It is typically a letter+number code + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the SKU. Ex - P3. It is typically a letter+number code", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string SkuName { get; set; } + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.", + SerializedName = @"size", + PossibleTypes = new [] { typeof(string) })] + string SkuSize { get; set; } + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", + SerializedName = @"tier", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Free", "Basic", "Standard", "Premium")] + string SkuTier { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags) })] + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags Tag { get; set; } + + } + /// The type used for update operations of the Workspace. + internal partial interface IWorkspaceUpdateInternal + + { + /// The SKU (Stock Keeping Unit) assigned to this resource. + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IAzureResourceManagerCommonTypesSkuUpdate Sku { get; set; } + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + int? SkuCapacity { get; set; } + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + string SkuFamily { get; set; } + /// The name of the SKU. Ex - P3. It is typically a letter+number code + string SkuName { get; set; } + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + string SkuSize { get; set; } + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Free", "Basic", "Standard", "Premium")] + string SkuTier { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdate.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdate.json.cs new file mode 100644 index 000000000000..91db548f97c1 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdate.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.FirmwareAnalysis.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + + /// The type used for update operations of the Workspace. + public partial class WorkspaceUpdate + { + + /// + /// 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.FirmwareAnalysis.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.FirmwareAnalysis.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.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new WorkspaceUpdate(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.FirmwareAnalysis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._sku ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._sku.ToJson(null,serializationMode) : null, "sku" ,container.Add ); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject instance to deserialize from. + internal WorkspaceUpdate(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.AzureResourceManagerCommonTypesSkuUpdate.FromJson(__jsonSku) : _sku;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceUpdateTags.FromJson(__jsonTags) : _tag;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateDefinition.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateDefinition.TypeConverter.cs deleted file mode 100644 index c3e0abf36c4a..000000000000 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateDefinition.TypeConverter.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models -{ - using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class WorkspaceUpdateDefinitionTypeConverter : 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.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Models.IWorkspaceUpdateDefinition ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinition).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return WorkspaceUpdateDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return WorkspaceUpdateDefinition.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return WorkspaceUpdateDefinition.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/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateDefinition.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateDefinition.cs deleted file mode 100644 index 1ad234aeb9cd..000000000000 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateDefinition.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models -{ - using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; - - /// Firmware analysis workspace. - public partial class WorkspaceUpdateDefinition : - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinition, - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinitionInternal - { - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceProperties Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinitionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinitionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspacePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspacePropertiesInternal)Property).ProvisioningState = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceProperties _property; - - /// The editable workspace properties. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceProperties()); set => this._property = value; } - - /// Provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Origin(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PropertyOrigin.Inlined)] - public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspacePropertiesInternal)Property).ProvisioningState; } - - /// Creates an new instance. - public WorkspaceUpdateDefinition() - { - - } - } - /// Firmware analysis workspace. - public partial interface IWorkspaceUpdateDefinition : - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable - { - /// Provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = false, - ReadOnly = true, - Read = true, - Create = false, - Update = false, - Description = @"Provisioning state of the resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Canceled", "Failed")] - string ProvisioningState { get; } - - } - /// Firmware analysis workspace. - internal partial interface IWorkspaceUpdateDefinitionInternal - - { - /// The editable workspace properties. - Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceProperties Property { get; set; } - /// Provisioning state of the resource. - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Canceled", "Failed")] - string ProvisioningState { get; set; } - - } -} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateDefinition.PowerShell.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateTags.PowerShell.cs similarity index 67% rename from generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateDefinition.PowerShell.cs rename to generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateTags.PowerShell.cs index 7ffe189b3a52..8165f54c9f20 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateDefinition.PowerShell.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateTags.PowerShell.cs @@ -7,9 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models { using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; - /// Firmware analysis workspace. - [System.ComponentModel.TypeConverter(typeof(WorkspaceUpdateDefinitionTypeConverter))] - public partial class WorkspaceUpdateDefinition + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(WorkspaceUpdateTagsTypeConverter))] + public partial class WorkspaceUpdateTags { /// @@ -63,37 +63,37 @@ public partial class WorkspaceUpdateDefinition 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.FirmwareAnalysis.Models.IWorkspaceUpdateDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new WorkspaceUpdateDefinition(content); + return new WorkspaceUpdateTags(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.FirmwareAnalysis.Models.IWorkspaceUpdateDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new WorkspaceUpdateDefinition(content); + return new WorkspaceUpdateTags(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// 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.FirmwareAnalysis.Models.IWorkspaceUpdateDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -113,11 +113,11 @@ 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. - internal WorkspaceUpdateDefinition(global::System.Collections.IDictionary content) + internal WorkspaceUpdateTags(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -126,23 +126,17 @@ internal WorkspaceUpdateDefinition(global::System.Collections.IDictionary conten return; } // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinitionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinitionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspacePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinitionInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinitionInternal)this).ProvisioningState, global::System.Convert.ToString); - } + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); 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. - internal WorkspaceUpdateDefinition(global::System.Management.Automation.PSObject content) + internal WorkspaceUpdateTags(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -151,20 +145,14 @@ internal WorkspaceUpdateDefinition(global::System.Management.Automation.PSObject return; } // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinitionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinitionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspacePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinitionInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinitionInternal)this).ProvisioningState, global::System.Convert.ToString); - } + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); AfterDeserializePSObject(content); } } - /// Firmware analysis workspace. - [System.ComponentModel.TypeConverter(typeof(WorkspaceUpdateDefinitionTypeConverter))] - public partial interface IWorkspaceUpdateDefinition + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(WorkspaceUpdateTagsTypeConverter))] + public partial interface IWorkspaceUpdateTags { diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateTags.TypeConverter.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateTags.TypeConverter.cs new file mode 100644 index 000000000000..b6ba02573034 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateTags.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.FirmwareAnalysis.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class WorkspaceUpdateTagsTypeConverter : 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.FirmwareAnalysis.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Models.IWorkspaceUpdateTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return WorkspaceUpdateTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return WorkspaceUpdateTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return WorkspaceUpdateTags.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/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateTags.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateTags.cs new file mode 100644 index 000000000000..9cb5a4ebcd63 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateTags.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.FirmwareAnalysis.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + + /// Resource tags. + public partial class WorkspaceUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTagsInternal + { + + /// Creates an new instance. + public WorkspaceUpdateTags() + { + + } + } + /// Resource tags. + public partial interface IWorkspaceUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface IWorkspaceUpdateTagsInternal + + { + + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateTags.dictionary.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateTags.dictionary.cs new file mode 100644 index 000000000000..808a7ed2ae4d --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateTags.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.FirmwareAnalysis.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + + public partial class WorkspaceUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.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.FirmwareAnalysis.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.FirmwareAnalysis.Models.WorkspaceUpdateTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateTags.json.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateTags.json.cs new file mode 100644 index 000000000000..2871dd0b693d --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/api/Models/WorkspaceUpdateTags.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + + /// Resource tags. + public partial class WorkspaceUpdateTags + { + + /// + /// 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.FirmwareAnalysis.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.FirmwareAnalysis.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.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject json ? new WorkspaceUpdateTags(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.FirmwareAnalysis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Json.JsonObject instance to deserialize from. + /// + internal WorkspaceUpdateTags(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisBinaryHardening_List.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisBinaryHardening_List.cs index 6aab9d0b7a86..244be8f27a8c 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisBinaryHardening_List.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisBinaryHardening_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Lists binary hardening analysis results of a firmware.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/binaryHardeningResults", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/binaryHardeningResults", ApiVersion = "2025-08-02")] public partial class GetAzFirmwareAnalysisBinaryHardening_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -201,12 +201,12 @@ public partial class GetAzFirmwareAnalysisBinaryHardening_List : 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.FirmwareAnalysis.Models.IBinaryHardeningListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceListResult /// 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) @@ -484,12 +484,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.FirmwareAnalysis.Models.IBinaryHardeningListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceListResult /// 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 ) { @@ -501,7 +501,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningListResult + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IBinaryHardeningResourceListResult var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisCryptoCertificate_List.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisCryptoCertificate_List.cs index eb49a691d815..1e01cab42de4 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisCryptoCertificate_List.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisCryptoCertificate_List.cs @@ -10,15 +10,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; using System; - /// Lists cryptographic certificate analysis results found in a firmware. + /// Lists crypto certificate analysis results of a firmware. /// /// [OpenAPI] ListByFirmware=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/cryptoCertificates" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFirmwareAnalysisCryptoCertificate_List")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Lists cryptographic certificate analysis results found in a firmware.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Lists crypto certificate analysis results of a firmware.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/cryptoCertificates", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/cryptoCertificates", ApiVersion = "2025-08-02")] public partial class GetAzFirmwareAnalysisCryptoCertificate_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -201,12 +201,12 @@ public partial class GetAzFirmwareAnalysisCryptoCertificate_List : global::Syste /// 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.FirmwareAnalysis.Models.ICryptoCertificateListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceListResult /// 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) @@ -484,12 +484,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.FirmwareAnalysis.Models.ICryptoCertificateListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceListResult /// 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 ) { @@ -501,7 +501,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateListResult + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoCertificateResourceListResult var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisCryptoKey_List.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisCryptoKey_List.cs index 42ec105e484c..837c836543a2 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisCryptoKey_List.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisCryptoKey_List.cs @@ -10,15 +10,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; using System; - /// Lists cryptographic key analysis results found in a firmware. + /// Lists crypto key analysis results of a firmware. /// /// [OpenAPI] ListByFirmware=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/cryptoKeys" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFirmwareAnalysisCryptoKey_List")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Lists cryptographic key analysis results found in a firmware.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Lists crypto key analysis results of a firmware.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/cryptoKeys", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/cryptoKeys", ApiVersion = "2025-08-02")] public partial class GetAzFirmwareAnalysisCryptoKey_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -201,12 +201,12 @@ public partial class GetAzFirmwareAnalysisCryptoKey_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.FirmwareAnalysis.Models.ICryptoKeyListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResult /// 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) @@ -484,12 +484,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.FirmwareAnalysis.Models.ICryptoKeyListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResult /// 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 ) { @@ -501,7 +501,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyListResult + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICryptoKeyResourceListResult var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisCve_List.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisCve_List.cs index d7d9c939c19c..13c1f3a17f4d 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisCve_List.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisCve_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Lists CVE analysis results of a firmware.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/cves", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/cves", ApiVersion = "2025-08-02")] public partial class GetAzFirmwareAnalysisCve_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -201,12 +201,12 @@ public partial class GetAzFirmwareAnalysisCve_List : global::System.Management.A /// 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.FirmwareAnalysis.Models.ICveListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceListResult /// 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) @@ -484,12 +484,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.FirmwareAnalysis.Models.ICveListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceListResult /// 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 ) { @@ -501,7 +501,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveListResult + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ICveResourceListResult var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisFirmware_Get.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisFirmware_Get.cs index 23815822cec6..584d0d38c779 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisFirmware_Get.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisFirmware_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmware))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Get firmware.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2025-08-02")] public partial class GetAzFirmwareAnalysisFirmware_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisFirmware_GetViaIdentity.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisFirmware_GetViaIdentity.cs index 307b18182724..eb4e3384a0c7 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisFirmware_GetViaIdentity.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisFirmware_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmware))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Get firmware.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2025-08-02")] public partial class GetAzFirmwareAnalysisFirmware_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisFirmware_GetViaIdentityWorkspace.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisFirmware_GetViaIdentityWorkspace.cs index 3d051426241f..2645346f2250 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisFirmware_GetViaIdentityWorkspace.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisFirmware_GetViaIdentityWorkspace.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmware))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Get firmware.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2025-08-02")] public partial class GetAzFirmwareAnalysisFirmware_GetViaIdentityWorkspace : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisFirmware_List.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisFirmware_List.cs index 891b424eefae..5b218916091e 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisFirmware_List.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisFirmware_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmware))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Lists all of firmwares inside a workspace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares", ApiVersion = "2025-08-02")] public partial class GetAzFirmwareAnalysisFirmware_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -187,12 +187,12 @@ public partial class GetAzFirmwareAnalysisFirmware_List : global::System.Managem /// 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.FirmwareAnalysis.Models.IFirmwareList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResult /// 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) @@ -470,12 +470,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.FirmwareAnalysis.Models.IFirmwareList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResult /// 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 ) { @@ -487,7 +487,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareList + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareListResult var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisOperation_List.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisOperation_List.cs index aadf3bd7fdd0..e21e66df5b50 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisOperation_List.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisOperation_List.cs @@ -10,16 +10,16 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; using System; - /// Lists the operations for this resource provider + /// List the operations for the provider /// /// [OpenAPI] List=>GET:"/providers/Microsoft.IoTFirmwareDefense/operations" /// [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFirmwareAnalysisOperation_List")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IOperation))] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Lists the operations for this resource provider")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"List the operations for the provider")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/providers/Microsoft.IoTFirmwareDefense/operations", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/providers/Microsoft.IoTFirmwareDefense/operations", ApiVersion = "2025-08-02")] public partial class GetAzFirmwareAnalysisOperation_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisPasswordHash_List.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisPasswordHash_List.cs index 9e9651e09e1c..4fd4d9b2ec1d 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisPasswordHash_List.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisPasswordHash_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Lists password hash analysis results of a firmware.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/passwordHashes", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/passwordHashes", ApiVersion = "2025-08-02")] public partial class GetAzFirmwareAnalysisPasswordHash_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -201,12 +201,12 @@ public partial class GetAzFirmwareAnalysisPasswordHash_List : 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.FirmwareAnalysis.Models.IPasswordHashListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResult /// 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) @@ -484,12 +484,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.FirmwareAnalysis.Models.IPasswordHashListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResult /// 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 ) { @@ -501,7 +501,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashListResult + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IPasswordHashResourceListResult var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSbomComponent_List.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSbomComponent_List.cs index 3c46035fbd88..74b9c7946bfc 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSbomComponent_List.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSbomComponent_List.cs @@ -10,15 +10,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; using System; - /// Lists SBOM analysis results of a firmware. + /// Lists sbom analysis results of a firmware. /// /// [OpenAPI] ListByFirmware=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/sbomComponents" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFirmwareAnalysisSbomComponent_List")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Lists SBOM analysis results of a firmware.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Lists sbom analysis results of a firmware.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/sbomComponents", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/sbomComponents", ApiVersion = "2025-08-02")] public partial class GetAzFirmwareAnalysisSbomComponent_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -201,12 +201,12 @@ public partial class GetAzFirmwareAnalysisSbomComponent_List : 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.FirmwareAnalysis.Models.ISbomComponentListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResult /// 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) @@ -484,12 +484,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.FirmwareAnalysis.Models.ISbomComponentListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResult /// 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 ) { @@ -501,7 +501,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentListResult + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISbomComponentResourceListResult var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSummary_Get.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSummary_Get.cs index 9add77348277..7fc0195698ef 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSummary_Get.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSummary_Get.cs @@ -12,13 +12,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets /// Get an analysis result summary of a firmware by name. /// - /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryName}" + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryType}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFirmwareAnalysisSummary_Get")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Get an analysis result summary of a firmware by name.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryName}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryType}", ApiVersion = "2025-08-02")] public partial class GetAzFirmwareAnalysisSummary_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -110,22 +110,6 @@ public partial class GetAzFirmwareAnalysisSummary_Get : global::System.Managemen /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - /// Backing field for property. - private string _name; - - /// The Firmware analysis summary name describing the type of summary. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Firmware analysis summary name describing the type of summary.")] - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Firmware analysis summary name describing the type of summary.", - SerializedName = @"summaryName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("SummaryName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CVE", "BinaryHardening", "CryptoCertificate", "CryptoKey")] - public string Name { get => this._name; set => this._name = value; } - /// /// The instance of the that the remote call will use. /// @@ -180,6 +164,22 @@ public partial class GetAzFirmwareAnalysisSummary_Get : global::System.Managemen [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + /// Backing field for property. + private string _type; + + /// The Firmware analysis summary name describing the type of summary. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Firmware analysis summary name describing the type of summary.")] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Firmware analysis summary name describing the type of summary.", + SerializedName = @"summaryType", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SummaryType")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CommonVulnerabilitiesAndExposures", "BinaryHardening", "CryptoCertificate", "CryptoKey")] + public string Type { get => this._type; set => this._type = value; } + /// Backing field for property. private string _workspaceName; @@ -410,13 +410,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.SummariesGet(SubscriptionId, ResourceGroupName, WorkspaceName, FirmwareId, Name, onOk, onDefault, this, Pipeline); + await this.Client.SummariesGet(SubscriptionId, ResourceGroupName, WorkspaceName, FirmwareId, Type, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,WorkspaceName=WorkspaceName,FirmwareId=FirmwareId,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,WorkspaceName=WorkspaceName,FirmwareId=FirmwareId,Type=Type}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSummary_GetViaIdentity.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSummary_GetViaIdentity.cs index 795f4cb267a8..fcc71683eeef 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSummary_GetViaIdentity.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSummary_GetViaIdentity.cs @@ -12,13 +12,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets /// Get an analysis result summary of a firmware by name. /// - /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryName}" + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryType}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFirmwareAnalysisSummary_GetViaIdentity")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Get an analysis result summary of a firmware by name.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryName}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryType}", ApiVersion = "2025-08-02")] public partial class GetAzFirmwareAnalysisSummary_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -362,11 +362,11 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.FirmwareId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SummaryName) + if (null == InputObject.SummaryType) { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SummaryName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SummaryType"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.SummariesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.WorkspaceName ?? null, InputObject.FirmwareId ?? null, InputObject.SummaryName ?? null, onOk, onDefault, this, Pipeline); + await this.Client.SummariesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.WorkspaceName ?? null, InputObject.FirmwareId ?? null, InputObject.SummaryType ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSummary_GetViaIdentityFirmware.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSummary_GetViaIdentityFirmware.cs index 956b0cd5afa5..ec5513d04254 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSummary_GetViaIdentityFirmware.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSummary_GetViaIdentityFirmware.cs @@ -12,13 +12,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets /// Get an analysis result summary of a firmware by name. /// - /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryName}" + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryType}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFirmwareAnalysisSummary_GetViaIdentityFirmware")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Get an analysis result summary of a firmware by name.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryName}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryType}", ApiVersion = "2025-08-02")] public partial class GetAzFirmwareAnalysisSummary_GetViaIdentityFirmware : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -104,22 +104,6 @@ public partial class GetAzFirmwareAnalysisSummary_GetViaIdentityFirmware : globa /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - /// Backing field for property. - private string _name; - - /// The Firmware analysis summary name describing the type of summary. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Firmware analysis summary name describing the type of summary.")] - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Firmware analysis summary name describing the type of summary.", - SerializedName = @"summaryName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("SummaryName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CVE", "BinaryHardening", "CryptoCertificate", "CryptoKey")] - public string Name { get => this._name; set => this._name = value; } - /// /// The instance of the that the remote call will use. /// @@ -141,6 +125,22 @@ public partial class GetAzFirmwareAnalysisSummary_GetViaIdentityFirmware : globa [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + /// Backing field for property. + private string _type; + + /// The Firmware analysis summary name describing the type of summary. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Firmware analysis summary name describing the type of summary.")] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Firmware analysis summary name describing the type of summary.", + SerializedName = @"summaryType", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SummaryType")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CommonVulnerabilitiesAndExposures", "BinaryHardening", "CryptoCertificate", "CryptoKey")] + public string Type { get => this._type; set => this._type = 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 @@ -357,7 +357,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (FirmwareInputObject?.Id != null) { - this.FirmwareInputObject.Id += $"/summaries/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + this.FirmwareInputObject.Id += $"/summaries/{(global::System.Uri.EscapeDataString(this.Type.ToString()))}"; await this.Client.SummariesGetViaIdentity(FirmwareInputObject.Id, onOk, onDefault, this, Pipeline); } else @@ -379,13 +379,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("FirmwareInputObject has null value for FirmwareInputObject.FirmwareId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, FirmwareInputObject) ); } - await this.Client.SummariesGet(FirmwareInputObject.SubscriptionId ?? null, FirmwareInputObject.ResourceGroupName ?? null, FirmwareInputObject.WorkspaceName ?? null, FirmwareInputObject.FirmwareId ?? null, Name, onOk, onDefault, this, Pipeline); + await this.Client.SummariesGet(FirmwareInputObject.SubscriptionId ?? null, FirmwareInputObject.ResourceGroupName ?? null, FirmwareInputObject.WorkspaceName ?? null, FirmwareInputObject.FirmwareId ?? null, Type, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Type=Type}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSummary_GetViaIdentityWorkspace.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSummary_GetViaIdentityWorkspace.cs index 85e608c6a8e4..75746a92dc8e 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSummary_GetViaIdentityWorkspace.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisSummary_GetViaIdentityWorkspace.cs @@ -12,13 +12,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets /// Get an analysis result summary of a firmware by name. /// - /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryName}" + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryType}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFirmwareAnalysisSummary_GetViaIdentityWorkspace")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ISummaryResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Get an analysis result summary of a firmware by name.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryName}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryType}", ApiVersion = "2025-08-02")] public partial class GetAzFirmwareAnalysisSummary_GetViaIdentityWorkspace : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -110,22 +110,6 @@ public partial class GetAzFirmwareAnalysisSummary_GetViaIdentityWorkspace : glob /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - /// Backing field for property. - private string _name; - - /// The Firmware analysis summary name describing the type of summary. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Firmware analysis summary name describing the type of summary.")] - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Firmware analysis summary name describing the type of summary.", - SerializedName = @"summaryName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("SummaryName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CVE", "BinaryHardening", "CryptoCertificate", "CryptoKey")] - public string Name { get => this._name; set => this._name = value; } - /// /// The instance of the that the remote call will use. /// @@ -147,6 +131,22 @@ public partial class GetAzFirmwareAnalysisSummary_GetViaIdentityWorkspace : glob [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + /// Backing field for property. + private string _type; + + /// The Firmware analysis summary name describing the type of summary. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Firmware analysis summary name describing the type of summary.")] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Firmware analysis summary name describing the type of summary.", + SerializedName = @"summaryType", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SummaryType")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Firmware", "CommonVulnerabilitiesAndExposures", "BinaryHardening", "CryptoCertificate", "CryptoKey")] + public string Type { get => this._type; set => this._type = value; } + /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentity _workspaceInputObject; @@ -371,7 +371,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (WorkspaceInputObject?.Id != null) { - this.WorkspaceInputObject.Id += $"/firmwares/{(global::System.Uri.EscapeDataString(this.FirmwareId.ToString()))}/summaries/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + this.WorkspaceInputObject.Id += $"/firmwares/{(global::System.Uri.EscapeDataString(this.FirmwareId.ToString()))}/summaries/{(global::System.Uri.EscapeDataString(this.Type.ToString()))}"; await this.Client.SummariesGetViaIdentity(WorkspaceInputObject.Id, onOk, onDefault, this, Pipeline); } else @@ -389,13 +389,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("WorkspaceInputObject has null value for WorkspaceInputObject.WorkspaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, WorkspaceInputObject) ); } - await this.Client.SummariesGet(WorkspaceInputObject.SubscriptionId ?? null, WorkspaceInputObject.ResourceGroupName ?? null, WorkspaceInputObject.WorkspaceName ?? null, FirmwareId, Name, onOk, onDefault, this, Pipeline); + await this.Client.SummariesGet(WorkspaceInputObject.SubscriptionId ?? null, WorkspaceInputObject.ResourceGroupName ?? null, WorkspaceInputObject.WorkspaceName ?? null, FirmwareId, Type, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { FirmwareId=FirmwareId,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { FirmwareId=FirmwareId,Type=Type}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisUsageMetric_Get.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisUsageMetric_Get.cs new file mode 100644 index 000000000000..6d1448b0b744 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisUsageMetric_Get.cs @@ -0,0 +1,521 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; + using System; + + /// Gets monthly usage information for a workspace. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/usageMetrics/{name}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFirmwareAnalysisUsageMetric_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetric))] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Gets monthly usage information for a workspace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/usageMetrics/{name}", ApiVersion = "2025-08-02")] + public partial class GetAzFirmwareAnalysisUsageMetric_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// 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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.FirmwareAnalysis Client => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// 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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Firmware analysis summary name describing the type of summary. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Firmware analysis summary name describing the type of summary.")] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Firmware analysis summary name describing the type of summary.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = 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.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private string _workspaceName; + + /// The name of the firmware analysis workspace. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the firmware analysis workspace.")] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the firmware analysis workspace.", + SerializedName = @"workspaceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] + public string WorkspaceName { get => this._workspaceName; set => this._workspaceName = 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.FirmwareAnalysis.Models.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.FirmwareAnalysis.Models.IUsageMetric + /// 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.FirmwareAnalysis.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzFirmwareAnalysisUsageMetric_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.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.UsageMetricsGet(SubscriptionId, ResourceGroupName, WorkspaceName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,WorkspaceName=WorkspaceName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Models.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.FirmwareAnalysis.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.FirmwareAnalysis.Models.IUsageMetric + /// 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.FirmwareAnalysis.Models.IUsageMetric + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisUsageMetric_GetViaIdentity.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisUsageMetric_GetViaIdentity.cs new file mode 100644 index 000000000000..e394676ad8bc --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisUsageMetric_GetViaIdentity.cs @@ -0,0 +1,489 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; + using System; + + /// Gets monthly usage information for a workspace. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/usageMetrics/{name}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFirmwareAnalysisUsageMetric_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetric))] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Gets monthly usage information for a workspace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/usageMetrics/{name}", ApiVersion = "2025-08-02")] + public partial class GetAzFirmwareAnalysisUsageMetric_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// 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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.FirmwareAnalysis Client => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// 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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentity 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.FirmwareAnalysis.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Models.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.FirmwareAnalysis.Models.IUsageMetric + /// 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.FirmwareAnalysis.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzFirmwareAnalysisUsageMetric_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.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.UsageMetricsGetViaIdentity(InputObject.Id, 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) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.WorkspaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.WorkspaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Name) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Name"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.UsageMetricsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.WorkspaceName ?? null, InputObject.Name ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Models.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.FirmwareAnalysis.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.FirmwareAnalysis.Models.IUsageMetric + /// 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.FirmwareAnalysis.Models.IUsageMetric + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisUsageMetric_GetViaIdentityWorkspace.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisUsageMetric_GetViaIdentityWorkspace.cs new file mode 100644 index 000000000000..9031c1f9fec1 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisUsageMetric_GetViaIdentityWorkspace.cs @@ -0,0 +1,500 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; + using System; + + /// Gets monthly usage information for a workspace. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/usageMetrics/{name}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFirmwareAnalysisUsageMetric_GetViaIdentityWorkspace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetric))] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Gets monthly usage information for a workspace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/usageMetrics/{name}", ApiVersion = "2025-08-02")] + public partial class GetAzFirmwareAnalysisUsageMetric_GetViaIdentityWorkspace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// 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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.FirmwareAnalysis Client => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// 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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Firmware analysis summary name describing the type of summary. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Firmware analysis summary name describing the type of summary.")] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Firmware analysis summary name describing the type of summary.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentity _workspaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentity WorkspaceInputObject { get => this._workspaceInputObject; set => this._workspaceInputObject = 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.FirmwareAnalysis.Models.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.FirmwareAnalysis.Models.IUsageMetric + /// 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.FirmwareAnalysis.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzFirmwareAnalysisUsageMetric_GetViaIdentityWorkspace() + { + + } + + /// 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.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (WorkspaceInputObject?.Id != null) + { + this.WorkspaceInputObject.Id += $"/usageMetrics/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.UsageMetricsGetViaIdentity(WorkspaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == WorkspaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("WorkspaceInputObject has null value for WorkspaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, WorkspaceInputObject) ); + } + if (null == WorkspaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("WorkspaceInputObject has null value for WorkspaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, WorkspaceInputObject) ); + } + if (null == WorkspaceInputObject.WorkspaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("WorkspaceInputObject has null value for WorkspaceInputObject.WorkspaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, WorkspaceInputObject) ); + } + await this.Client.UsageMetricsGet(WorkspaceInputObject.SubscriptionId ?? null, WorkspaceInputObject.ResourceGroupName ?? null, WorkspaceInputObject.WorkspaceName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Models.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.FirmwareAnalysis.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.FirmwareAnalysis.Models.IUsageMetric + /// 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.FirmwareAnalysis.Models.IUsageMetric + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisUsageMetric_List.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisUsageMetric_List.cs new file mode 100644 index 000000000000..be9ee31477f8 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisUsageMetric_List.cs @@ -0,0 +1,534 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; + using System; + + /// Lists monthly usage information for a workspace. + /// + /// [OpenAPI] ListByWorkspace=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/usageMetrics" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFirmwareAnalysisUsageMetric_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUsageMetric))] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Lists monthly usage information for a workspace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/usageMetrics", ApiVersion = "2025-08-02")] + public partial class GetAzFirmwareAnalysisUsageMetric_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// 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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.FirmwareAnalysis Client => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// 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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = 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.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private string _workspaceName; + + /// The name of the firmware analysis workspace. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the firmware analysis workspace.")] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the firmware analysis workspace.", + SerializedName = @"workspaceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] + public string WorkspaceName { get => this._workspaceName; set => this._workspaceName = 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.FirmwareAnalysis.Models.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.FirmwareAnalysis.Models.IUsageMetricListResult + /// 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.FirmwareAnalysis.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzFirmwareAnalysisUsageMetric_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.UsageMetricsListByWorkspace(SubscriptionId, ResourceGroupName, WorkspaceName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,WorkspaceName=WorkspaceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Models.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.FirmwareAnalysis.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.FirmwareAnalysis.Models.IUsageMetricListResult + /// 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.FirmwareAnalysis.Models.IUsageMetricListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.UsageMetricsListByWorkspace_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisWorkspace_Get.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisWorkspace_Get.cs index d97f95ec72d8..aae41ee6a133 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisWorkspace_Get.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisWorkspace_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspace))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Get firmware analysis workspace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}", ApiVersion = "2025-08-02")] public partial class GetAzFirmwareAnalysisWorkspace_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisWorkspace_GetViaIdentity.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisWorkspace_GetViaIdentity.cs index 9f0b0ba1303f..43d0dbbd597f 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisWorkspace_GetViaIdentity.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisWorkspace_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspace))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Get firmware analysis workspace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}", ApiVersion = "2025-08-02")] public partial class GetAzFirmwareAnalysisWorkspace_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisWorkspace_List.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisWorkspace_List.cs index 0c11b65a8a21..d7ab194985b5 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisWorkspace_List.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisWorkspace_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspace))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Lists all of the firmware analysis workspaces in the specified subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.IoTFirmwareDefense/workspaces", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.IoTFirmwareDefense/workspaces", ApiVersion = "2025-08-02")] public partial class GetAzFirmwareAnalysisWorkspace_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -159,12 +159,12 @@ public partial class GetAzFirmwareAnalysisWorkspace_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.FirmwareAnalysis.Models.IWorkspaceList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResult /// 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) @@ -442,12 +442,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.FirmwareAnalysis.Models.IWorkspaceList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResult /// 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 ) { @@ -459,7 +459,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceList + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResult var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisWorkspace_List1.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisWorkspace_List1.cs index 74ebc3fd7e68..ca07ec2225d1 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisWorkspace_List1.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/GetAzFirmwareAnalysisWorkspace_List1.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspace))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Lists all of the firmware analysis workspaces in the specified resource group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces", ApiVersion = "2025-08-02")] public partial class GetAzFirmwareAnalysisWorkspace_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -173,12 +173,12 @@ public partial class GetAzFirmwareAnalysisWorkspace_List1 : 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.FirmwareAnalysis.Models.IWorkspaceList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResult /// 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) @@ -456,12 +456,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.FirmwareAnalysis.Models.IWorkspaceList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResult /// 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 ) { @@ -473,7 +473,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceList + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceListResult var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisFirmware_CreateExpanded.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisFirmware_CreateExpanded.cs index f4b3613a6bae..8dece4ddf4e8 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisFirmware_CreateExpanded.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisFirmware_CreateExpanded.cs @@ -10,15 +10,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; using System; - /// The operation to Create a firmware. + /// The operation to create a firmware. /// /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzFirmwareAnalysisFirmware_CreateExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmware))] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to Create a firmware.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to create a firmware.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2025-08-02")] public partial class NewAzFirmwareAnalysisFirmware_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -40,12 +40,12 @@ public partial class NewAzFirmwareAnalysisFirmware_CreateExpanded : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// Firmware definition - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmware _firmwareBody = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Firmware(); - /// A buffer to record first returned object in response. private object _firstResponse = null; + /// Firmware definition + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmware _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Firmware(); + /// /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. /// Two means multiple returned objects in response. @@ -82,7 +82,7 @@ public partial class NewAzFirmwareAnalysisFirmware_CreateExpanded : global::Syst Description = @"User-specified description of the firmware.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] - public string Description { get => _firmwareBody.Description ?? null; set => _firmwareBody.Description = value; } + public string Description { get => _resourceBody.Description ?? null; set => _resourceBody.Description = value; } /// Accessor for extensibleParameters. public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } @@ -96,7 +96,7 @@ public partial class NewAzFirmwareAnalysisFirmware_CreateExpanded : global::Syst Description = @"File name for a firmware that user uploaded.", SerializedName = @"fileName", PossibleTypes = new [] { typeof(string) })] - public string FileName { get => _firmwareBody.FileName ?? null; set => _firmwareBody.FileName = value; } + public string FileName { get => _resourceBody.FileName ?? null; set => _resourceBody.FileName = value; } /// File size of the uploaded firmware image. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "File size of the uploaded firmware image.")] @@ -107,7 +107,7 @@ public partial class NewAzFirmwareAnalysisFirmware_CreateExpanded : global::Syst Description = @"File size of the uploaded firmware image.", SerializedName = @"fileSize", PossibleTypes = new [] { typeof(long) })] - public long FileSize { get => _firmwareBody.FileSize ?? default(long); set => _firmwareBody.FileSize = value; } + public long FileSize { get => _resourceBody.FileSize ?? default(long); set => _resourceBody.FileSize = 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")] @@ -161,7 +161,7 @@ public partial class NewAzFirmwareAnalysisFirmware_CreateExpanded : global::Syst Description = @"Firmware model.", SerializedName = @"model", PossibleTypes = new [] { typeof(string) })] - public string Model { get => _firmwareBody.Model ?? null; set => _firmwareBody.Model = value; } + public string Model { get => _resourceBody.Model ?? null; set => _resourceBody.Model = value; } /// /// The instance of the that the remote call will use. @@ -208,7 +208,7 @@ public partial class NewAzFirmwareAnalysisFirmware_CreateExpanded : global::Syst SerializedName = @"status", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Pending", "Extracting", "Analyzing", "Ready", "Error")] - public string Status { get => _firmwareBody.Status ?? null; set => _firmwareBody.Status = value; } + public string Status { get => _resourceBody.Status ?? null; set => _resourceBody.Status = value; } /// A list of errors or other messages generated during firmware analysis [global::System.Management.Automation.AllowEmptyCollection] @@ -220,7 +220,7 @@ public partial class NewAzFirmwareAnalysisFirmware_CreateExpanded : global::Syst Description = @"A list of errors or other messages generated during firmware analysis", SerializedName = @"statusMessages", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IStatusMessage) })] - public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IStatusMessage[] StatusMessage { get => _firmwareBody.StatusMessage?.ToArray() ?? null /* fixedArrayOf */; set => _firmwareBody.StatusMessage = (value != null ? new System.Collections.Generic.List(value) : null); } + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IStatusMessage[] StatusMessage { get => _resourceBody.StatusMessage?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.StatusMessage = (value != null ? new System.Collections.Generic.List(value) : null); } /// Backing field for property. private string _subscriptionId; @@ -250,7 +250,7 @@ public partial class NewAzFirmwareAnalysisFirmware_CreateExpanded : global::Syst Description = @"Firmware vendor.", SerializedName = @"vendor", PossibleTypes = new [] { typeof(string) })] - public string Vendor { get => _firmwareBody.Vendor ?? null; set => _firmwareBody.Vendor = value; } + public string Vendor { get => _resourceBody.Vendor ?? null; set => _resourceBody.Vendor = value; } /// Firmware version. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Firmware version.")] @@ -261,7 +261,7 @@ public partial class NewAzFirmwareAnalysisFirmware_CreateExpanded : global::Syst Description = @"Firmware version.", SerializedName = @"version", PossibleTypes = new [] { typeof(string) })] - public string Version { get => _firmwareBody.Version ?? null; set => _firmwareBody.Version = value; } + public string Version { get => _resourceBody.Version ?? null; set => _resourceBody.Version = value; } /// Backing field for property. private string _workspaceName; @@ -506,7 +506,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.FirmwaresCreate(SubscriptionId, ResourceGroupName, WorkspaceName, Id, _firmwareBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate); + await this.Client.FirmwaresCreate(SubscriptionId, ResourceGroupName, WorkspaceName, Id, _resourceBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.UndeclaredResponseException urexception) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_Generate.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_Generate.cs index fd24c3211b5f..3cdea9ec8269 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_Generate.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_Generate.cs @@ -10,15 +10,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; using System; - /// The operation to get a url for file upload. + /// Generate a URL for uploading a firmware image. /// /// [OpenAPI] GenerateUploadUrl=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzFirmwareAnalysisWorkspaceUploadUrl_Generate", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUrlToken))] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to get a url for file upload.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Generate a URL for uploading a firmware image.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl", ApiVersion = "2025-08-02")] public partial class NewAzFirmwareAnalysisWorkspaceUploadUrl_Generate : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -49,6 +49,20 @@ public partial class NewAzFirmwareAnalysisWorkspaceUploadUrl_Generate : global:: /// private int _responseSize = 0; + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest _body; + + /// Properties for generating an upload URL + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Properties for generating an upload URL", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Properties for generating an upload URL", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest Body { get => this._body; set => this._body = 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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] @@ -73,20 +87,6 @@ public partial class NewAzFirmwareAnalysisWorkspaceUploadUrl_Generate : global:: /// Accessor for extensibleParameters. public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest _generateUploadUrl; - - /// Properties for generating an upload URL - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Properties for generating an upload URL", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Properties for generating an upload URL", - SerializedName = @"generateUploadUrl", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] - public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest GenerateUploadUrl { get => this._generateUploadUrl; set => this._generateUploadUrl = 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] @@ -395,7 +395,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.WorkspacesGenerateUploadUrl(SubscriptionId, ResourceGroupName, WorkspaceName, GenerateUploadUrl, onOk, onDefault, this, Pipeline); + await this.Client.WorkspacesGenerateUploadUrl(SubscriptionId, ResourceGroupName, WorkspaceName, Body, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.UndeclaredResponseException urexception) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateExpanded.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateExpanded.cs index 37b4d6e89e6f..8fb6dfdf2751 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateExpanded.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateExpanded.cs @@ -10,15 +10,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; using System; - /// The operation to get a url for file upload. + /// Generate a URL for uploading a firmware image. /// /// [OpenAPI] GenerateUploadUrl=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzFirmwareAnalysisWorkspaceUploadUrl_GenerateExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUrlToken))] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to get a url for file upload.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Generate a URL for uploading a firmware image.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl", ApiVersion = "2025-08-02")] public partial class NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -32,6 +32,9 @@ public partial class NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateExpanded : /// A unique id generatd for the this cmdlet when ProcessRecord() is called. private string __processRecordId; + /// Properties for generating an upload URL + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest _body = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.GenerateUploadUrlRequest(); + /// /// The for this operation. /// @@ -43,9 +46,6 @@ public partial class NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateExpanded : /// A buffer to record first returned object in response. private object _firstResponse = null; - /// Properties for generating an upload URL - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest _generateUploadUrlBody = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.GenerateUploadUrlRequest(); - /// /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. /// Two means multiple returned objects in response. @@ -85,7 +85,7 @@ public partial class NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateExpanded : Description = @"A unique ID for the firmware to be uploaded.", SerializedName = @"firmwareId", PossibleTypes = new [] { typeof(string) })] - public string FirmwareId { get => _generateUploadUrlBody.FirmwareId ?? null; set => _generateUploadUrlBody.FirmwareId = value; } + public string FirmwareId { get => _body.FirmwareId ?? null; set => _body.FirmwareId = 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")] @@ -395,7 +395,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.WorkspacesGenerateUploadUrl(SubscriptionId, ResourceGroupName, WorkspaceName, _generateUploadUrlBody, onOk, onDefault, this, Pipeline); + await this.Client.WorkspacesGenerateUploadUrl(SubscriptionId, ResourceGroupName, WorkspaceName, _body, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.UndeclaredResponseException urexception) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaIdentity.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaIdentity.cs index 18bd8c610201..df82297ee356 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaIdentity.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaIdentity.cs @@ -10,15 +10,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; using System; - /// The operation to get a url for file upload. + /// Generate a URL for uploading a firmware image. /// /// [OpenAPI] GenerateUploadUrl=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaIdentity", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUrlToken))] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to get a url for file upload.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Generate a URL for uploading a firmware image.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl", ApiVersion = "2025-08-02")] public partial class NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -49,6 +49,20 @@ public partial class NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaIdentity /// private int _responseSize = 0; + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest _body; + + /// Properties for generating an upload URL + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Properties for generating an upload URL", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Properties for generating an upload URL", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest Body { get => this._body; set => this._body = 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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] @@ -73,20 +87,6 @@ public partial class NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaIdentity /// Accessor for extensibleParameters. public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest _generateUploadUrl; - - /// Properties for generating an upload URL - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Properties for generating an upload URL", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Properties for generating an upload URL", - SerializedName = @"generateUploadUrl", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] - public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest GenerateUploadUrl { get => this._generateUploadUrl; set => this._generateUploadUrl = 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] @@ -358,7 +358,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.WorkspacesGenerateUploadUrlViaIdentity(InputObject.Id, GenerateUploadUrl, onOk, onDefault, this, Pipeline); + await this.Client.WorkspacesGenerateUploadUrlViaIdentity(InputObject.Id, Body, onOk, onDefault, this, Pipeline); } else { @@ -375,7 +375,7 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.WorkspaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.WorkspacesGenerateUploadUrl(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.WorkspaceName ?? null, GenerateUploadUrl, onOk, onDefault, this, Pipeline); + await this.Client.WorkspacesGenerateUploadUrl(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.WorkspaceName ?? null, Body, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaIdentityExpanded.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaIdentityExpanded.cs index 28fa2606803b..14248b2b7b18 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaIdentityExpanded.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaIdentityExpanded.cs @@ -10,15 +10,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; using System; - /// The operation to get a url for file upload. + /// Generate a URL for uploading a firmware image. /// /// [OpenAPI] GenerateUploadUrl=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaIdentityExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUrlToken))] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to get a url for file upload.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Generate a URL for uploading a firmware image.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl", ApiVersion = "2025-08-02")] public partial class NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -32,6 +32,9 @@ public partial class NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaIdentity /// A unique id generatd for the this cmdlet when ProcessRecord() is called. private string __processRecordId; + /// Properties for generating an upload URL + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest _body = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.GenerateUploadUrlRequest(); + /// /// The for this operation. /// @@ -43,9 +46,6 @@ public partial class NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaIdentity /// A buffer to record first returned object in response. private object _firstResponse = null; - /// Properties for generating an upload URL - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IGenerateUploadUrlRequest _generateUploadUrlBody = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.GenerateUploadUrlRequest(); - /// /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. /// Two means multiple returned objects in response. @@ -85,7 +85,7 @@ public partial class NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaIdentity Description = @"A unique ID for the firmware to be uploaded.", SerializedName = @"firmwareId", PossibleTypes = new [] { typeof(string) })] - public string FirmwareId { get => _generateUploadUrlBody.FirmwareId ?? null; set => _generateUploadUrlBody.FirmwareId = value; } + public string FirmwareId { get => _body.FirmwareId ?? null; set => _body.FirmwareId = 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")] @@ -359,7 +359,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.WorkspacesGenerateUploadUrlViaIdentity(InputObject.Id, _generateUploadUrlBody, onOk, onDefault, this, Pipeline); + await this.Client.WorkspacesGenerateUploadUrlViaIdentity(InputObject.Id, _body, onOk, onDefault, this, Pipeline); } else { @@ -376,7 +376,7 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.WorkspaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.WorkspacesGenerateUploadUrl(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.WorkspaceName ?? null, _generateUploadUrlBody, onOk, onDefault, this, Pipeline); + await this.Client.WorkspacesGenerateUploadUrl(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.WorkspaceName ?? null, _body, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaJsonFilePath.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaJsonFilePath.cs index 58a8b2886170..2d5c1683156d 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaJsonFilePath.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaJsonFilePath.cs @@ -10,15 +10,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; using System; - /// The operation to get a url for file upload. + /// Generate a URL for uploading a firmware image. /// /// [OpenAPI] GenerateUploadUrl=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaJsonFilePath", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUrlToken))] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to get a url for file upload.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Generate a URL for uploading a firmware image.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl", ApiVersion = "2025-08-02")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.NotSuggestDefaultParameterSet] public partial class NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaJsonString.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaJsonString.cs index 3878931a7361..75dc39adec4d 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaJsonString.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaJsonString.cs @@ -10,15 +10,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; using System; - /// The operation to get a url for file upload. + /// Generate a URL for uploading a firmware image. /// /// [OpenAPI] GenerateUploadUrl=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaJsonString", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IUrlToken))] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to get a url for file upload.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"Generate a URL for uploading a firmware image.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl", ApiVersion = "2025-08-02")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.NotSuggestDefaultParameterSet] public partial class NewAzFirmwareAnalysisWorkspaceUploadUrl_GenerateViaJsonString : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspace_CreateExpanded.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspace_CreateExpanded.cs index e12e5a60ed1e..fe24c3206aa4 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspace_CreateExpanded.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/NewAzFirmwareAnalysisWorkspace_CreateExpanded.cs @@ -10,15 +10,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; using System; - /// The operation to Create a firmware analysis workspace. + /// The operation to create a firmware analysis workspace. /// /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzFirmwareAnalysisWorkspace_CreateExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspace))] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to Create a firmware analysis workspace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to create a firmware analysis workspace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}", ApiVersion = "2025-08-02")] public partial class NewAzFirmwareAnalysisWorkspace_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -43,15 +43,15 @@ public partial class NewAzFirmwareAnalysisWorkspace_CreateExpanded : global::Sys /// A buffer to record first returned object in response. private object _firstResponse = null; + /// Firmware analysis workspace. + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspace _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Workspace(); + /// /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. /// Two means multiple returned objects in response. /// private int _responseSize = 0; - /// Firmware analysis workspace. - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspace _workspaceBody = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.Workspace(); - /// 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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] @@ -100,7 +100,7 @@ public partial class NewAzFirmwareAnalysisWorkspace_CreateExpanded : global::Sys Description = @"The geo-location where the resource lives", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] - public string Location { get => _workspaceBody.Location ?? null; set => _workspaceBody.Location = value; } + public string Location { get => _resourceBody.Location ?? null; set => _resourceBody.Location = value; } /// /// cancellation delegate. Stops the cmdlet when called. @@ -160,6 +160,72 @@ public partial class NewAzFirmwareAnalysisWorkspace_CreateExpanded : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", + SerializedName = @"capacity", + PossibleTypes = new [] { typeof(int) })] + public int SkuCapacity { get => _resourceBody.SkuCapacity ?? default(int); set => _resourceBody.SkuCapacity = value; } + + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the service has different generations of hardware, for the same SKU, then that can be captured here.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", + SerializedName = @"family", + PossibleTypes = new [] { typeof(string) })] + public string SkuFamily { get => _resourceBody.SkuFamily ?? null; set => _resourceBody.SkuFamily = value; } + + /// The name of the SKU. E.g. P3. It is typically a letter+number code + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name of the SKU. E.g. P3. It is typically a letter+number code")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the SKU. E.g. P3. It is typically a letter+number code", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + public string SkuName { get => _resourceBody.SkuName ?? null; set => _resourceBody.SkuName = value; } + + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", + SerializedName = @"size", + PossibleTypes = new [] { typeof(string) })] + public string SkuSize { get => _resourceBody.SkuSize ?? null; set => _resourceBody.SkuSize = value; } + + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", + SerializedName = @"tier", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Free", "Basic", "Standard", "Premium")] + public string SkuTier { get => _resourceBody.SkuTier ?? null; set => _resourceBody.SkuTier = value; } + /// Backing field for property. private string _subscriptionId; @@ -189,7 +255,7 @@ public partial class NewAzFirmwareAnalysisWorkspace_CreateExpanded : global::Sys Description = @"Resource tags.", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ITrackedResourceTags Tag { get => _workspaceBody.Tag ?? null /* object */; set => _workspaceBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.ITrackedResourceTags Tag { get => _resourceBody.Tag ?? null /* object */; set => _resourceBody.Tag = value; } /// /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what @@ -420,7 +486,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.WorkspacesCreate(SubscriptionId, ResourceGroupName, Name, _workspaceBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate); + await this.Client.WorkspacesCreate(SubscriptionId, ResourceGroupName, Name, _resourceBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.UndeclaredResponseException urexception) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisFirmware_Delete.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisFirmware_Delete.cs index 2eff9b58d681..3c47c9a2b470 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisFirmware_Delete.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisFirmware_Delete.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to delete a firmware.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2025-08-02")] public partial class RemoveAzFirmwareAnalysisFirmware_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -509,7 +509,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -533,7 +533,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisFirmware_DeleteViaIdentity.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisFirmware_DeleteViaIdentity.cs index b9ed7f78e20c..b1a4a08f2912 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisFirmware_DeleteViaIdentity.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisFirmware_DeleteViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to delete a firmware.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2025-08-02")] public partial class RemoveAzFirmwareAnalysisFirmware_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -479,7 +479,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -503,7 +503,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisFirmware_DeleteViaIdentityWorkspace.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisFirmware_DeleteViaIdentityWorkspace.cs index 09f925d3bf55..7b1e3eccf1f1 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisFirmware_DeleteViaIdentityWorkspace.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisFirmware_DeleteViaIdentityWorkspace.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to delete a firmware.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2025-08-02")] public partial class RemoveAzFirmwareAnalysisFirmware_DeleteViaIdentityWorkspace : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -491,7 +491,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -515,7 +515,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisWorkspace_Delete.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisWorkspace_Delete.cs index 1c1a67c318c8..c0eb2b21e6c3 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisWorkspace_Delete.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisWorkspace_Delete.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to delete a firmware analysis workspace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}", ApiVersion = "2025-08-02")] public partial class RemoveAzFirmwareAnalysisWorkspace_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -40,14 +40,10 @@ public partial class RemoveAzFirmwareAnalysisWorkspace_Delete : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; + /// 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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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")] @@ -111,6 +107,14 @@ public partial class RemoveAzFirmwareAnalysisWorkspace_Delete : global::System.M [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] public string Name { get => this._name; set => this._name = value; } + /// + /// 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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + /// /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. /// @@ -222,14 +226,32 @@ protected override void BeginProcessing() ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFirmwareAnalysisWorkspace_Delete + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets.RemoveAzFirmwareAnalysisWorkspace_Delete Clone() + { + var clone = new RemoveAzFirmwareAnalysisWorkspace_Delete(); + 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.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -280,8 +302,8 @@ protected override void EndProcessing() } case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.Information: { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); + // 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.FirmwareAnalysis.Runtime.Events.Debug: @@ -319,6 +341,40 @@ protected override void EndProcessing() }); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + 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.FirmwareAnalysis.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } } await Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) @@ -339,9 +395,21 @@ protected override void ProcessRecord() // work if (ShouldProcess($"Call remote 'WorkspacesDelete' operation")) { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token) ) + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token); + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token); + } } } } @@ -389,7 +457,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.WorkspacesDelete(SubscriptionId, ResourceGroupName, Name, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.WorkspacesDelete(SubscriptionId, ResourceGroupName, Name, onNoContent, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.UndeclaredResponseException urexception) @@ -495,7 +563,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -519,7 +587,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisWorkspace_DeleteViaIdentity.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisWorkspace_DeleteViaIdentity.cs index a7dd231afa0a..134625d3be1d 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisWorkspace_DeleteViaIdentity.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/RemoveAzFirmwareAnalysisWorkspace_DeleteViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to delete a firmware analysis workspace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}", ApiVersion = "2025-08-02")] public partial class RemoveAzFirmwareAnalysisWorkspace_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -40,14 +40,10 @@ public partial class RemoveAzFirmwareAnalysisWorkspace_DeleteViaIdentity : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; + /// 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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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")] @@ -104,6 +100,14 @@ public partial class RemoveAzFirmwareAnalysisWorkspace_DeleteViaIdentity : globa /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + /// /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. /// @@ -182,14 +186,29 @@ protected override void BeginProcessing() ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFirmwareAnalysisWorkspace_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets.RemoveAzFirmwareAnalysisWorkspace_DeleteViaIdentity Clone() + { + var clone = new RemoveAzFirmwareAnalysisWorkspace_DeleteViaIdentity(); + 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; + return clone; + } + /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -240,8 +259,8 @@ protected override void EndProcessing() } case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.Information: { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); + // 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.FirmwareAnalysis.Runtime.Events.Debug: @@ -279,6 +298,40 @@ protected override void EndProcessing() }); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + 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.FirmwareAnalysis.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } } await Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) @@ -299,9 +352,21 @@ protected override void ProcessRecord() // work if (ShouldProcess($"Call remote 'WorkspacesDelete' operation")) { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token) ) + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token); + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token); + } } } } @@ -351,7 +416,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.WorkspacesDeleteViaIdentity(InputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.WorkspacesDeleteViaIdentity(InputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); } else { @@ -368,7 +433,7 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.WorkspaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.WorkspacesDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.WorkspaceName ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.WorkspacesDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.WorkspaceName ?? null, onNoContent, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } @@ -475,7 +540,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -499,7 +564,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisFirmware_UpdateExpanded.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisFirmware_UpdateExpanded.cs index 8d42f1e5c74b..95c983f2734a 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisFirmware_UpdateExpanded.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisFirmware_UpdateExpanded.cs @@ -10,15 +10,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; using System; - /// The operation to Update firmware. + /// The operation to update firmware. /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFirmwareAnalysisFirmware_UpdateExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmware))] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to Update firmware.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to update firmware.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2025-08-02")] public partial class UpdateAzFirmwareAnalysisFirmware_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -40,12 +40,12 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateExpanded : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// Firmware definition - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareUpdateDefinition _firmwareBody = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareUpdateDefinition(); - /// A buffer to record first returned object in response. private object _firstResponse = null; + /// Firmware definition + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareUpdateDefinition _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareUpdateDefinition(); + /// /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. /// Two means multiple returned objects in response. @@ -82,7 +82,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateExpanded : global::S Description = @"User-specified description of the firmware.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] - public string Description { get => _firmwareBody.Description ?? null; set => _firmwareBody.Description = value; } + public string Description { get => _propertiesBody.Description ?? null; set => _propertiesBody.Description = value; } /// Accessor for extensibleParameters. public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } @@ -96,7 +96,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateExpanded : global::S Description = @"File name for a firmware that user uploaded.", SerializedName = @"fileName", PossibleTypes = new [] { typeof(string) })] - public string FileName { get => _firmwareBody.FileName ?? null; set => _firmwareBody.FileName = value; } + public string FileName { get => _propertiesBody.FileName ?? null; set => _propertiesBody.FileName = value; } /// File size of the uploaded firmware image. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "File size of the uploaded firmware image.")] @@ -107,7 +107,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateExpanded : global::S Description = @"File size of the uploaded firmware image.", SerializedName = @"fileSize", PossibleTypes = new [] { typeof(long) })] - public long FileSize { get => _firmwareBody.FileSize ?? default(long); set => _firmwareBody.FileSize = value; } + public long FileSize { get => _propertiesBody.FileSize ?? default(long); set => _propertiesBody.FileSize = 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")] @@ -156,7 +156,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateExpanded : global::S Description = @"Firmware model.", SerializedName = @"model", PossibleTypes = new [] { typeof(string) })] - public string Model { get => _firmwareBody.Model ?? null; set => _firmwareBody.Model = value; } + public string Model { get => _propertiesBody.Model ?? null; set => _propertiesBody.Model = value; } /// /// The instance of the that the remote call will use. @@ -203,7 +203,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateExpanded : global::S SerializedName = @"status", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Pending", "Extracting", "Analyzing", "Ready", "Error")] - public string Status { get => _firmwareBody.Status ?? null; set => _firmwareBody.Status = value; } + public string Status { get => _propertiesBody.Status ?? null; set => _propertiesBody.Status = value; } /// A list of errors or other messages generated during firmware analysis [global::System.Management.Automation.AllowEmptyCollection] @@ -215,7 +215,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateExpanded : global::S Description = @"A list of errors or other messages generated during firmware analysis", SerializedName = @"statusMessages", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IStatusMessage) })] - public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IStatusMessage[] StatusMessage { get => _firmwareBody.StatusMessage?.ToArray() ?? null /* fixedArrayOf */; set => _firmwareBody.StatusMessage = (value != null ? new System.Collections.Generic.List(value) : null); } + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IStatusMessage[] StatusMessage { get => _propertiesBody.StatusMessage?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.StatusMessage = (value != null ? new System.Collections.Generic.List(value) : null); } /// Backing field for property. private string _subscriptionId; @@ -245,7 +245,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateExpanded : global::S Description = @"Firmware vendor.", SerializedName = @"vendor", PossibleTypes = new [] { typeof(string) })] - public string Vendor { get => _firmwareBody.Vendor ?? null; set => _firmwareBody.Vendor = value; } + public string Vendor { get => _propertiesBody.Vendor ?? null; set => _propertiesBody.Vendor = value; } /// Firmware version. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Firmware version.")] @@ -256,7 +256,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateExpanded : global::S Description = @"Firmware version.", SerializedName = @"version", PossibleTypes = new [] { typeof(string) })] - public string Version { get => _firmwareBody.Version ?? null; set => _firmwareBody.Version = value; } + public string Version { get => _propertiesBody.Version ?? null; set => _propertiesBody.Version = value; } /// Backing field for property. private string _workspaceName; @@ -481,7 +481,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.FirmwaresUpdate(SubscriptionId, ResourceGroupName, WorkspaceName, Id, _firmwareBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate); + await this.Client.FirmwaresUpdate(SubscriptionId, ResourceGroupName, WorkspaceName, Id, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.UndeclaredResponseException urexception) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityExpanded.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityExpanded.cs index 1c9814751db0..e74c8ad9eaed 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityExpanded.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityExpanded.cs @@ -10,15 +10,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; using System; - /// The operation to Update firmware. + /// The operation to update firmware. /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFirmwareAnalysisFirmware_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmware))] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to Update firmware.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to update firmware.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2025-08-02")] public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -40,12 +40,12 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// Firmware definition - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareUpdateDefinition _firmwareBody = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareUpdateDefinition(); - /// A buffer to record first returned object in response. private object _firstResponse = null; + /// Firmware definition + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareUpdateDefinition _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareUpdateDefinition(); + /// /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. /// Two means multiple returned objects in response. @@ -82,7 +82,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityExpanded Description = @"User-specified description of the firmware.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] - public string Description { get => _firmwareBody.Description ?? null; set => _firmwareBody.Description = value; } + public string Description { get => _propertiesBody.Description ?? null; set => _propertiesBody.Description = value; } /// Accessor for extensibleParameters. public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } @@ -96,7 +96,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityExpanded Description = @"File name for a firmware that user uploaded.", SerializedName = @"fileName", PossibleTypes = new [] { typeof(string) })] - public string FileName { get => _firmwareBody.FileName ?? null; set => _firmwareBody.FileName = value; } + public string FileName { get => _propertiesBody.FileName ?? null; set => _propertiesBody.FileName = value; } /// File size of the uploaded firmware image. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "File size of the uploaded firmware image.")] @@ -107,7 +107,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityExpanded Description = @"File size of the uploaded firmware image.", SerializedName = @"fileSize", PossibleTypes = new [] { typeof(long) })] - public long FileSize { get => _firmwareBody.FileSize ?? default(long); set => _firmwareBody.FileSize = value; } + public long FileSize { get => _propertiesBody.FileSize ?? default(long); set => _propertiesBody.FileSize = 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")] @@ -149,7 +149,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityExpanded Description = @"Firmware model.", SerializedName = @"model", PossibleTypes = new [] { typeof(string) })] - public string Model { get => _firmwareBody.Model ?? null; set => _firmwareBody.Model = value; } + public string Model { get => _propertiesBody.Model ?? null; set => _propertiesBody.Model = value; } /// /// The instance of the that the remote call will use. @@ -182,7 +182,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityExpanded SerializedName = @"status", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Pending", "Extracting", "Analyzing", "Ready", "Error")] - public string Status { get => _firmwareBody.Status ?? null; set => _firmwareBody.Status = value; } + public string Status { get => _propertiesBody.Status ?? null; set => _propertiesBody.Status = value; } /// A list of errors or other messages generated during firmware analysis [global::System.Management.Automation.AllowEmptyCollection] @@ -194,7 +194,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityExpanded Description = @"A list of errors or other messages generated during firmware analysis", SerializedName = @"statusMessages", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IStatusMessage) })] - public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IStatusMessage[] StatusMessage { get => _firmwareBody.StatusMessage?.ToArray() ?? null /* fixedArrayOf */; set => _firmwareBody.StatusMessage = (value != null ? new System.Collections.Generic.List(value) : null); } + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IStatusMessage[] StatusMessage { get => _propertiesBody.StatusMessage?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.StatusMessage = (value != null ? new System.Collections.Generic.List(value) : null); } /// Firmware vendor. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Firmware vendor.")] @@ -205,7 +205,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityExpanded Description = @"Firmware vendor.", SerializedName = @"vendor", PossibleTypes = new [] { typeof(string) })] - public string Vendor { get => _firmwareBody.Vendor ?? null; set => _firmwareBody.Vendor = value; } + public string Vendor { get => _propertiesBody.Vendor ?? null; set => _propertiesBody.Vendor = value; } /// Firmware version. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Firmware version.")] @@ -216,7 +216,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityExpanded Description = @"Firmware version.", SerializedName = @"version", PossibleTypes = new [] { typeof(string) })] - public string Version { get => _firmwareBody.Version ?? null; set => _firmwareBody.Version = value; } + public string Version { get => _propertiesBody.Version ?? null; set => _propertiesBody.Version = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -429,7 +429,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.FirmwaresUpdateViaIdentity(InputObject.Id, _firmwareBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate); + await this.Client.FirmwaresUpdateViaIdentity(InputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate); } else { @@ -450,7 +450,7 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.FirmwareId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.FirmwaresUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.WorkspaceName ?? null, InputObject.FirmwareId ?? null, _firmwareBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate); + await this.Client.FirmwaresUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.WorkspaceName ?? null, InputObject.FirmwareId ?? null, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityWorkspaceExpanded.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityWorkspaceExpanded.cs index 2cdd7b4cfbe0..b722f41163f7 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityWorkspaceExpanded.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityWorkspaceExpanded.cs @@ -10,15 +10,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; using System; - /// The operation to Update firmware. + /// The operation to update firmware. /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFirmwareAnalysisFirmware_UpdateViaIdentityWorkspaceExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmware))] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to Update firmware.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to update firmware.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}", ApiVersion = "2025-08-02")] public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityWorkspaceExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -40,12 +40,12 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityWorkspace /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// Firmware definition - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareUpdateDefinition _firmwareBody = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareUpdateDefinition(); - /// A buffer to record first returned object in response. private object _firstResponse = null; + /// Firmware definition + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareUpdateDefinition _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.FirmwareUpdateDefinition(); + /// /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. /// Two means multiple returned objects in response. @@ -82,7 +82,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityWorkspace Description = @"User-specified description of the firmware.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] - public string Description { get => _firmwareBody.Description ?? null; set => _firmwareBody.Description = value; } + public string Description { get => _propertiesBody.Description ?? null; set => _propertiesBody.Description = value; } /// Accessor for extensibleParameters. public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } @@ -96,7 +96,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityWorkspace Description = @"File name for a firmware that user uploaded.", SerializedName = @"fileName", PossibleTypes = new [] { typeof(string) })] - public string FileName { get => _firmwareBody.FileName ?? null; set => _firmwareBody.FileName = value; } + public string FileName { get => _propertiesBody.FileName ?? null; set => _propertiesBody.FileName = value; } /// File size of the uploaded firmware image. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "File size of the uploaded firmware image.")] @@ -107,7 +107,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityWorkspace Description = @"File size of the uploaded firmware image.", SerializedName = @"fileSize", PossibleTypes = new [] { typeof(long) })] - public long FileSize { get => _firmwareBody.FileSize ?? default(long); set => _firmwareBody.FileSize = value; } + public long FileSize { get => _propertiesBody.FileSize ?? default(long); set => _propertiesBody.FileSize = 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")] @@ -156,7 +156,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityWorkspace Description = @"Firmware model.", SerializedName = @"model", PossibleTypes = new [] { typeof(string) })] - public string Model { get => _firmwareBody.Model ?? null; set => _firmwareBody.Model = value; } + public string Model { get => _propertiesBody.Model ?? null; set => _propertiesBody.Model = value; } /// /// The instance of the that the remote call will use. @@ -189,7 +189,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityWorkspace SerializedName = @"status", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Pending", "Extracting", "Analyzing", "Ready", "Error")] - public string Status { get => _firmwareBody.Status ?? null; set => _firmwareBody.Status = value; } + public string Status { get => _propertiesBody.Status ?? null; set => _propertiesBody.Status = value; } /// A list of errors or other messages generated during firmware analysis [global::System.Management.Automation.AllowEmptyCollection] @@ -201,7 +201,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityWorkspace Description = @"A list of errors or other messages generated during firmware analysis", SerializedName = @"statusMessages", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IStatusMessage) })] - public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IStatusMessage[] StatusMessage { get => _firmwareBody.StatusMessage?.ToArray() ?? null /* fixedArrayOf */; set => _firmwareBody.StatusMessage = (value != null ? new System.Collections.Generic.List(value) : null); } + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IStatusMessage[] StatusMessage { get => _propertiesBody.StatusMessage?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.StatusMessage = (value != null ? new System.Collections.Generic.List(value) : null); } /// Firmware vendor. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Firmware vendor.")] @@ -212,7 +212,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityWorkspace Description = @"Firmware vendor.", SerializedName = @"vendor", PossibleTypes = new [] { typeof(string) })] - public string Vendor { get => _firmwareBody.Vendor ?? null; set => _firmwareBody.Vendor = value; } + public string Vendor { get => _propertiesBody.Vendor ?? null; set => _propertiesBody.Vendor = value; } /// Firmware version. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Firmware version.")] @@ -223,7 +223,7 @@ public partial class UpdateAzFirmwareAnalysisFirmware_UpdateViaIdentityWorkspace Description = @"Firmware version.", SerializedName = @"version", PossibleTypes = new [] { typeof(string) })] - public string Version { get => _firmwareBody.Version ?? null; set => _firmwareBody.Version = value; } + public string Version { get => _propertiesBody.Version ?? null; set => _propertiesBody.Version = value; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IFirmwareAnalysisIdentity _workspaceInputObject; @@ -445,7 +445,7 @@ protected override void ProcessRecord() if (WorkspaceInputObject?.Id != null) { this.WorkspaceInputObject.Id += $"/firmwares/{(global::System.Uri.EscapeDataString(this.Id.ToString()))}"; - await this.Client.FirmwaresUpdateViaIdentity(WorkspaceInputObject.Id, _firmwareBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate); + await this.Client.FirmwaresUpdateViaIdentity(WorkspaceInputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate); } else { @@ -462,7 +462,7 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("WorkspaceInputObject has null value for WorkspaceInputObject.WorkspaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, WorkspaceInputObject) ); } - await this.Client.FirmwaresUpdate(WorkspaceInputObject.SubscriptionId ?? null, WorkspaceInputObject.ResourceGroupName ?? null, WorkspaceInputObject.WorkspaceName ?? null, Id, _firmwareBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate); + await this.Client.FirmwaresUpdate(WorkspaceInputObject.SubscriptionId ?? null, WorkspaceInputObject.ResourceGroupName ?? null, WorkspaceInputObject.WorkspaceName ?? null, Id, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisWorkspace_UpdateExpanded.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisWorkspace_UpdateExpanded.cs index 6f8c4a30a8a9..8057b34ac859 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisWorkspace_UpdateExpanded.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisWorkspace_UpdateExpanded.cs @@ -10,15 +10,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; using System; - /// The operation to Update a firmware analysis workspaces. + /// The operation to update a firmware analysis workspaces. /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFirmwareAnalysisWorkspace_UpdateExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspace))] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to Update a firmware analysis workspaces.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to update a firmware analysis workspaces.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}", ApiVersion = "2025-08-02")] public partial class UpdateAzFirmwareAnalysisWorkspace_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -43,15 +43,15 @@ public partial class UpdateAzFirmwareAnalysisWorkspace_UpdateExpanded : global:: /// A buffer to record first returned object in response. private object _firstResponse = null; + /// The type used for update operations of the Workspace. + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceUpdate(); + /// /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. /// Two means multiple returned objects in response. /// private int _responseSize = 0; - /// Firmware analysis workspace. - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinition _workspaceBody = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceUpdateDefinition(); - /// 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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] @@ -149,6 +149,72 @@ public partial class UpdateAzFirmwareAnalysisWorkspace_UpdateExpanded : global:: [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", + SerializedName = @"capacity", + PossibleTypes = new [] { typeof(int) })] + public int SkuCapacity { get => _propertiesBody.SkuCapacity ?? default(int); set => _propertiesBody.SkuCapacity = value; } + + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the service has different generations of hardware, for the same SKU, then that can be captured here.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", + SerializedName = @"family", + PossibleTypes = new [] { typeof(string) })] + public string SkuFamily { get => _propertiesBody.SkuFamily ?? null; set => _propertiesBody.SkuFamily = value; } + + /// The name of the SKU. Ex - P3. It is typically a letter+number code + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name of the SKU. Ex - P3. It is typically a letter+number code")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the SKU. Ex - P3. It is typically a letter+number code", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + public string SkuName { get => _propertiesBody.SkuName ?? null; set => _propertiesBody.SkuName = value; } + + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.", + SerializedName = @"size", + PossibleTypes = new [] { typeof(string) })] + public string SkuSize { get => _propertiesBody.SkuSize ?? null; set => _propertiesBody.SkuSize = value; } + + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", + SerializedName = @"tier", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Free", "Basic", "Standard", "Premium")] + public string SkuTier { get => _propertiesBody.SkuTier ?? null; set => _propertiesBody.SkuTier = value; } + /// Backing field for property. private string _subscriptionId; @@ -168,6 +234,18 @@ public partial class UpdateAzFirmwareAnalysisWorkspace_UpdateExpanded : global:: [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = 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 @@ -377,7 +455,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.WorkspacesUpdate(SubscriptionId, ResourceGroupName, Name, _workspaceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate); + await this.Client.WorkspacesUpdate(SubscriptionId, ResourceGroupName, Name, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.UndeclaredResponseException urexception) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisWorkspace_UpdateViaIdentityExpanded.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisWorkspace_UpdateViaIdentityExpanded.cs index 8fecf518f304..3daabe54e0f9 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisWorkspace_UpdateViaIdentityExpanded.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/cmdlets/UpdateAzFirmwareAnalysisWorkspace_UpdateViaIdentityExpanded.cs @@ -10,15 +10,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Cmdlets; using System; - /// The operation to Update a firmware analysis workspaces. + /// The operation to update a firmware analysis workspaces. /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFirmwareAnalysisWorkspace_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspace))] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to Update a firmware analysis workspaces.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Description(@"The operation to update a firmware analysis workspaces.")] [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}", ApiVersion = "2024-01-10")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}", ApiVersion = "2025-08-02")] public partial class UpdateAzFirmwareAnalysisWorkspace_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IContext @@ -43,15 +43,15 @@ public partial class UpdateAzFirmwareAnalysisWorkspace_UpdateViaIdentityExpanded /// A buffer to record first returned object in response. private object _firstResponse = null; + /// The type used for update operations of the Workspace. + private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceUpdate(); + /// /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. /// Two means multiple returned objects in response. /// private int _responseSize = 0; - /// Firmware analysis workspace. - private Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateDefinition _workspaceBody = new Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.WorkspaceUpdateDefinition(); - /// 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.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] @@ -128,6 +128,84 @@ public partial class UpdateAzFirmwareAnalysisWorkspace_UpdateViaIdentityExpanded [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", + SerializedName = @"capacity", + PossibleTypes = new [] { typeof(int) })] + public int SkuCapacity { get => _propertiesBody.SkuCapacity ?? default(int); set => _propertiesBody.SkuCapacity = value; } + + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the service has different generations of hardware, for the same SKU, then that can be captured here.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", + SerializedName = @"family", + PossibleTypes = new [] { typeof(string) })] + public string SkuFamily { get => _propertiesBody.SkuFamily ?? null; set => _propertiesBody.SkuFamily = value; } + + /// The name of the SKU. Ex - P3. It is typically a letter+number code + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name of the SKU. Ex - P3. It is typically a letter+number code")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the SKU. Ex - P3. It is typically a letter+number code", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + public string SkuName { get => _propertiesBody.SkuName ?? null; set => _propertiesBody.SkuName = value; } + + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.", + SerializedName = @"size", + PossibleTypes = new [] { typeof(string) })] + public string SkuSize { get => _propertiesBody.SkuSize ?? null; set => _propertiesBody.SkuSize = value; } + + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", + SerializedName = @"tier", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.PSArgumentCompleterAttribute("Free", "Basic", "Standard", "Premium")] + public string SkuTier { get => _propertiesBody.SkuTier ?? null; set => _propertiesBody.SkuTier = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Category(global::Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Models.IWorkspaceUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = 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 @@ -339,7 +417,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.WorkspacesUpdateViaIdentity(InputObject.Id, _workspaceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate); + await this.Client.WorkspacesUpdateViaIdentity(InputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate); } else { @@ -356,7 +434,7 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.WorkspaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.WorkspacesUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.WorkspaceName ?? null, _workspaceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate); + await this.Client.WorkspacesUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.WorkspaceName ?? null, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs index 45a1aada8220..f2756a3698a3 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -51,7 +51,7 @@ protected override void ProcessRecord() throw new ArgumentException($"Custom folder '{CustomFolder}' does not exist"); } - string version = Convert.ToString(@"0.1.0"); + string version = Convert.ToString(@"0.2.0"); // Validate the module version should be semantic version // Following regex is official from https://semver.org/ Regex rx = new Regex(@"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$", RegexOptions.Compiled); diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs index 309750f818a1..df78c6f01932 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs @@ -36,14 +36,23 @@ internal class PsHelpInfo public object Role { get; } public string NonTerminatingErrors { get; } + public static string CapitalizeFirstLetter(string text) + { + if (string.IsNullOrEmpty(text)) + return text; + + return char.ToUpper(text[0]) + text.Substring(1); + } + public PsHelpInfo(PSObject helpObject = null) { helpObject = helpObject ?? new PSObject(); CmdletName = helpObject.GetProperty("Name").NullIfEmpty() ?? helpObject.GetNestedProperty("details", "name"); ModuleName = helpObject.GetProperty("ModuleName"); - Synopsis = helpObject.GetProperty("Synopsis"); + Synopsis = CapitalizeFirstLetter(helpObject.GetProperty("Synopsis")); Description = helpObject.GetProperty("description").EmptyIfNull().ToDescriptionText().NullIfEmpty() ?? helpObject.GetNestedProperty("details", "description").EmptyIfNull().ToDescriptionText(); + Description = CapitalizeFirstLetter(Description); AlertText = helpObject.GetNestedProperty("alertSet", "alert").EmptyIfNull().ToDescriptionText(); Category = helpObject.GetProperty("Category"); HasCommonParameters = helpObject.GetProperty("CommonParameters").ToNullableBool(); diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 7855baf6067f..239480e85511 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -216,6 +216,21 @@ public string GetProcessCustomAttributesAtRuntime() {Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; } + private string GetLoginVerification() + { + if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + { + return $@" +{Indent}{Indent}$context = Get-AzContext +{Indent}{Indent}if (-not $context -and -not $testPlayback) {{ +{Indent}{Indent}{Indent}Write-Error ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" +{Indent}{Indent}{Indent}exit +{Indent}{Indent}}} +"; + } + return ""; + } + private string GetTelemetry() { if (!VariantGroup.IsInternal && IsAzure) @@ -248,10 +263,16 @@ public override string ToString() => $@"begin {{ {Indent}{Indent}{Indent}$PSBoundParameters['OutBuffer'] = 1 {Indent}{Indent}}} {Indent}{Indent}$parameterSet = $PSCmdlet.ParameterSetName -{GetTelemetry()} +{Indent}{Indent} +{Indent}{Indent}$testPlayback = $false +{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) }} }} +{GetLoginVerification()}{GetTelemetry()} {GetParameterSetToCmdletMapping()}{GetDefaultValuesStatements()} {GetProcessCustomAttributesAtRuntime()} {Indent}{Indent}$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) +{Indent}{Indent}if ($wrappedCmd -eq $null) {{ +{Indent}{Indent}{Indent}$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) +{Indent}{Indent}}} {Indent}{Indent}$scriptCmd = {{& $wrappedCmd @PSBoundParameters}} {Indent}{Indent}$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) {Indent}{Indent}$steppablePipeline.Begin($PSCmdlet) @@ -295,8 +316,6 @@ private string GetDefaultValuesStatements() if ("SubscriptionId".Equals(parameterName)) { sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); - sb.AppendLine($"{Indent}{Indent}{Indent}$testPlayback = $false"); - sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.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 {{"); diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs index e810a865bbe1..e1f235461252 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -49,6 +49,7 @@ internal class VariantGroup public PsHelpInfo HelpInfo { get; } public bool IsGenerated { get; } public bool IsInternal { get; } + public bool IsModelCmdlet { get; } public string OutputFolder { get; } public string FileName { get; } public string FilePath { get; } @@ -83,6 +84,7 @@ public VariantGroup(string moduleName, string cmdletName, Variant[] variants, st HelpInfo = Variants.Select(v => v.HelpInfo).FirstOrDefault() ?? new PsHelpInfo(); IsGenerated = Variants.All(v => v.Attributes.OfType().Any()); IsInternal = isInternal; + IsModelCmdlet = Variants.All(v => v.IsModelCmdlet); OutputFolder = outputFolder; FileName = $"{CmdletName}{(isTest ? ".Tests" : String.Empty)}.ps1"; FilePath = Path.Combine(OutputFolder, FileName); @@ -143,6 +145,7 @@ internal class Variant public Parameter[] Parameters { get; } public Parameter[] CmdletOnlyParameters { get; } public bool IsInternal { get; } + public bool IsModelCmdlet { get; } public bool IsDoNotExport { get; } public bool IsNotSuggestDefaultParameterSet { get; } public string[] Profiles { get; } @@ -165,6 +168,7 @@ public Variant(string cmdletName, string variantName, CommandInfo info, CommandM Parameters = this.ToParameters().OrderBy(p => p.OrderCategory).ThenByDescending(p => p.IsMandatory).ToArray(); IsInternal = Attributes.OfType().Any(); IsDoNotExport = Attributes.OfType().Any(); + IsModelCmdlet = Attributes.OfType().Any(); IsNotSuggestDefaultParameterSet = Attributes.OfType().Any(); CmdletOnlyParameters = Parameters.Where(p => !p.Categories.Any(c => c == ParameterCategory.Azure || c == ParameterCategory.Runtime)).ToArray(); Profiles = Attributes.OfType().SelectMany(pa => pa.Profiles).ToArray(); @@ -388,6 +392,7 @@ public CommentInfo(VariantGroup variantGroup) var helpInfo = variantGroup.HelpInfo; Description = variantGroup.Variants.SelectMany(v => v.Attributes).OfType().FirstOrDefault()?.Description.NullIfEmpty() ?? helpInfo.Description.EmptyIfNull(); + Description = PsHelpInfo.CapitalizeFirstLetter(Description); // If there is no Synopsis, PowerShell may put in the Syntax string as the Synopsis. This seems unintended, so we remove the Synopsis in this situation. var synopsis = helpInfo.Synopsis.EmptyIfNull().Trim().StartsWith(variantGroup.CmdletName) ? String.Empty : helpInfo.Synopsis; Synopsis = synopsis.NullIfEmpty() ?? Description; diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/PsAttributes.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/PsAttributes.cs index da07913cfd21..537ccc60e05a 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/PsAttributes.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/BuildTime/PsAttributes.cs @@ -22,6 +22,11 @@ public class DoNotExportAttribute : Attribute { } + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)] + public class ModelCmdletAttribute : Attribute + { + } + [AttributeUsage(AttributeTargets.Class)] public class InternalExportAttribute : Attribute { diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/MessageAttribute.cs b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/MessageAttribute.cs index 65d174ac3e07..6631b483278b 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/MessageAttribute.cs +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/MessageAttribute.cs @@ -16,9 +16,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime public class GenericBreakingChangeAttribute : Attribute { private string _message; - //A dexcription of what the change is about, non mandatory + //A description of what the change is about, non mandatory public string ChangeDescription { get; set; } = null; + //Name of the module that is being deprecated + public string moduleName { get; set; } = String.IsNullOrEmpty(@"") ? @"Az.FirmwareAnalysis" : @""; + //The version the change is effective from, non mandatory public string DeprecateByVersion { get; } public string DeprecateByAzVersion { get; } @@ -82,7 +85,7 @@ public void PrintCustomAttributeInfo(Action writeOutput) } writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion)); - writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion)); + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.moduleName, this.DeprecateByVersion)); if (OldWay != null && NewWay != null) { @@ -191,11 +194,11 @@ public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this( this.IsEstimatedGaDateSet = true; } } - + public void PrintCustomAttributeInfo(Action writeOutput) { writeOutput(this._message); - + if (IsEstimatedGaDateSet) { writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString())); diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/Properties/Resources.resx b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/Properties/Resources.resx index a08a2e50172b..4ef90b70573d 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/Properties/Resources.resx +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/generated/runtime/Properties/Resources.resx @@ -1705,7 +1705,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can -- The change is expected to take effect from version : '{0}' +- The change is expected to take effect in '{0}' from version : '{1}' ```powershell diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/internal/Get-AzFirmwareAnalysisOperation.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/internal/Get-AzFirmwareAnalysisOperation.ps1 index 2283f81aca9f..e0038d2853c1 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/internal/Get-AzFirmwareAnalysisOperation.ps1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/internal/Get-AzFirmwareAnalysisOperation.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Lists the operations for this resource provider +List the operations for the provider .Description -Lists the operations for this resource provider +List the operations for the provider .Example {{ Add code here }} .Example @@ -89,12 +89,18 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ List = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisOperation_List'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/internal/ProxyCmdletDefinitions.ps1 b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/internal/ProxyCmdletDefinitions.ps1 index 2283f81aca9f..e0038d2853c1 100644 --- a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Lists the operations for this resource provider +List the operations for the provider .Description -Lists the operations for this resource provider +List the operations for the provider .Example {{ Add code here }} .Example @@ -89,12 +89,18 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FirmwareAnalysis.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ List = 'Az.FirmwareAnalysis.private\Get-AzFirmwareAnalysisOperation_List'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/resources/README.md b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/resources/README.md new file mode 100644 index 000000000000..937f07f8fec2 --- /dev/null +++ b/generated/FirmwareAnalysis/FirmwareAnalysis.Autorest/resources/README.md @@ -0,0 +1,11 @@ +# Resources +This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `..\custom` folder. + +## Info +- Modifiable: yes +- Generated: no +- Committed: yes +- Packaged: no + +## Purpose +Use this folder to put anything you want to keep around as part of the repository for the module, but is not something that is required for the module. For example, development files, packaged builds, or additional information. This is only intended to be used in repositories where the module's output directory is cleaned, but tangential resources for the module want to remain intact. \ No newline at end of file