diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsights.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsights.ps1 index 6b1f9340640b..3eb39c36f5eb 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsights.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsights.ps1 @@ -160,8 +160,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsApiKey.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsApiKey.ps1 index 59cd30af7f85..ac2e699e2fce 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsApiKey.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsApiKey.ps1 @@ -173,8 +173,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsContinuousExport.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsContinuousExport.ps1 index da6e27fd0f07..e63d11f59b44 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsContinuousExport.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsContinuousExport.ps1 @@ -173,8 +173,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsLinkedStorageAccount.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsLinkedStorageAccount.ps1 index 0532663b5d1d..74c03ba5ad86 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsLinkedStorageAccount.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsLinkedStorageAccount.ps1 @@ -140,8 +140,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsMyWorkbook.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsMyWorkbook.ps1 index cb812daa070e..fa110680573a 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsMyWorkbook.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsMyWorkbook.ps1 @@ -149,8 +149,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsWebTest.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsWebTest.ps1 index 3fd87c1b39ef..e228db2b325a 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsWebTest.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsWebTest.ps1 @@ -166,8 +166,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsWorkbook.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsWorkbook.ps1 index 7b40d3072340..a8c4146507bf 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsWorkbook.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsWorkbook.ps1 @@ -179,8 +179,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsWorkbookRevision.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsWorkbookRevision.ps1 index ad3d17fe7538..ef77a890997f 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsWorkbookRevision.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsWorkbookRevision.ps1 @@ -173,8 +173,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsWorkbookTemplate.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsWorkbookTemplate.ps1 index 47c6f3859f07..9d2b4aa2c856 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsWorkbookTemplate.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Get-AzApplicationInsightsWorkbookTemplate.ps1 @@ -170,8 +170,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsights.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsights.ps1 index 846812695d92..7d901b6b7266 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsights.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsights.ps1 @@ -241,8 +241,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsApiKey.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsApiKey.ps1 index a0da00189b05..a0e19cc3214e 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsApiKey.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsApiKey.ps1 @@ -131,8 +131,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsContinuousExport.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsContinuousExport.ps1 index d035d2d01962..fd3d1c06c80b 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsContinuousExport.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsContinuousExport.ps1 @@ -164,8 +164,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsLinkedStorageAccount.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsLinkedStorageAccount.ps1 index 0c5a8b13b20d..0d64c8c5fcfb 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsLinkedStorageAccount.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsLinkedStorageAccount.ps1 @@ -133,8 +133,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsMyWorkbook.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsMyWorkbook.ps1 index eb1e2001d79f..2bf8dc56e612 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsMyWorkbook.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsMyWorkbook.ps1 @@ -216,8 +216,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsWebTest.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsWebTest.ps1 index caad8a259216..c5805633dd6d 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsWebTest.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsWebTest.ps1 @@ -327,8 +327,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsWorkbook.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsWorkbook.ps1 index 53ef94732095..16d92bea56ce 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsWorkbook.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsWorkbook.ps1 @@ -215,8 +215,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsWorkbookTemplate.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsWorkbookTemplate.ps1 index 0cc4ac9eb9ba..2128532095a4 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsWorkbookTemplate.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/New-AzApplicationInsightsWorkbookTemplate.ps1 @@ -212,8 +212,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/ProxyCmdletDefinitions.ps1 index 07b59f67806a..e6e29a343aa3 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -173,8 +173,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -419,8 +418,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -632,8 +630,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -852,8 +849,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1090,8 +1086,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1337,8 +1332,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1580,8 +1574,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1830,8 +1823,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2036,8 +2028,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2324,8 +2315,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2611,8 +2601,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2898,8 +2887,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -3141,8 +3129,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -3381,8 +3368,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -3599,8 +3585,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -3789,8 +3774,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -4007,8 +3991,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -4225,8 +4208,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -4443,8 +4425,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -4660,8 +4641,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -4897,8 +4877,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -5122,8 +5101,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -5359,8 +5337,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -5646,8 +5623,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -5936,8 +5912,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -6172,8 +6147,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -6487,8 +6461,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -6688,8 +6661,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -6922,8 +6894,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -7319,8 +7290,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -7920,8 +7890,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -8115,8 +8084,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -8320,8 +8288,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -8613,8 +8580,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsights.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsights.ps1 index ea52e4c210e9..840bab1bbee9 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsights.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsights.ps1 @@ -146,8 +146,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsApiKey.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsApiKey.ps1 index 6e0ea24e29fd..df6a2023184f 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsApiKey.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsApiKey.ps1 @@ -168,8 +168,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsContinuousExport.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsContinuousExport.ps1 index 3d7fe56fcdfb..b5deab46f242 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsContinuousExport.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsContinuousExport.ps1 @@ -168,8 +168,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsLinkedStorageAccount.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsLinkedStorageAccount.ps1 index c48b5c1dad17..dd29e5a4cd86 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsLinkedStorageAccount.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsLinkedStorageAccount.ps1 @@ -146,8 +146,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsMyWorkbook.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsMyWorkbook.ps1 index b882ea7804d3..8f7bcfecda51 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsMyWorkbook.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsMyWorkbook.ps1 @@ -119,8 +119,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsWebTest.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsWebTest.ps1 index ea6e2b42696f..35ced88eae0d 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsWebTest.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsWebTest.ps1 @@ -148,8 +148,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsWorkbook.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsWorkbook.ps1 index d84519154882..c65fc154c114 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsWorkbook.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsWorkbook.ps1 @@ -147,8 +147,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsWorkbookTemplate.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsWorkbookTemplate.ps1 index 82f26a053910..dbfd355d62a1 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsWorkbookTemplate.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Remove-AzApplicationInsightsWorkbookTemplate.ps1 @@ -147,8 +147,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Set-AzApplicationInsightsContinuousExport.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Set-AzApplicationInsightsContinuousExport.ps1 index 18dae4983196..06ad83a5127b 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Set-AzApplicationInsightsContinuousExport.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Set-AzApplicationInsightsContinuousExport.ps1 @@ -176,8 +176,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Set-AzApplicationInsightsDailyCap.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Set-AzApplicationInsightsDailyCap.ps1 index 1b15aea106a2..540ef7870c05 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Set-AzApplicationInsightsDailyCap.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Set-AzApplicationInsightsDailyCap.ps1 @@ -125,8 +125,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Set-AzApplicationInsightsPricingPlan.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Set-AzApplicationInsightsPricingPlan.ps1 index 0fe661bab8bb..b60fef616acd 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Set-AzApplicationInsightsPricingPlan.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Set-AzApplicationInsightsPricingPlan.ps1 @@ -135,8 +135,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsights.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsights.ps1 index 7e7ba9ecf052..557500ec14d1 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsights.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsights.ps1 @@ -223,8 +223,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsLinkedStorageAccount.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsLinkedStorageAccount.ps1 index 129cff21956d..9297280a35e0 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsLinkedStorageAccount.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsLinkedStorageAccount.ps1 @@ -166,8 +166,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsMyWorkbook.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsMyWorkbook.ps1 index bb85a3587cde..1f2d100f3009 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsMyWorkbook.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsMyWorkbook.ps1 @@ -152,8 +152,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsWebTestTag.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsWebTestTag.ps1 index 930391b5f2b3..48457a672f46 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsWebTestTag.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsWebTestTag.ps1 @@ -167,8 +167,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsWorkbook.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsWorkbook.ps1 index 9ec1db4d57f2..3a61fff1d38b 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsWorkbook.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsWorkbook.ps1 @@ -217,8 +217,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsWorkbookTemplate.ps1 b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsWorkbookTemplate.ps1 index 91c8269b5839..391e7341991d 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsWorkbookTemplate.ps1 +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/exports/Update-AzApplicationInsightsWorkbookTemplate.ps1 @@ -214,8 +214,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ApplicationInsights/ApplicationInsights.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/ApplicationInsights/ApplicationInsights.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 6d25cf05d486..36ebd79f0fee 100644 --- a/generated/ApplicationInsights/ApplicationInsights.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/ApplicationInsights/ApplicationInsights.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -218,13 +218,12 @@ public string GetProcessCustomAttributesAtRuntime() private string GetLoginVerification() { - if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + 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}{Indent}throw ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" {Indent}{Indent}}} "; } diff --git a/generated/Compute/Compute.Autorest/exports/Get-AzGalleryApplication.ps1 b/generated/Compute/Compute.Autorest/exports/Get-AzGalleryApplication.ps1 index 8fffd2fc34b7..c6c7af7896ae 100644 --- a/generated/Compute/Compute.Autorest/exports/Get-AzGalleryApplication.ps1 +++ b/generated/Compute/Compute.Autorest/exports/Get-AzGalleryApplication.ps1 @@ -176,8 +176,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Compute/Compute.Autorest/exports/Get-AzGalleryApplicationVersion.ps1 b/generated/Compute/Compute.Autorest/exports/Get-AzGalleryApplicationVersion.ps1 index 07a1178f85fe..7a026361e416 100644 --- a/generated/Compute/Compute.Autorest/exports/Get-AzGalleryApplicationVersion.ps1 +++ b/generated/Compute/Compute.Autorest/exports/Get-AzGalleryApplicationVersion.ps1 @@ -217,8 +217,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Compute/Compute.Autorest/exports/Invoke-AzSpotPlacementScore.ps1 b/generated/Compute/Compute.Autorest/exports/Invoke-AzSpotPlacementScore.ps1 index 30db4ef99c24..a41325f88e9f 100644 --- a/generated/Compute/Compute.Autorest/exports/Invoke-AzSpotPlacementScore.ps1 +++ b/generated/Compute/Compute.Autorest/exports/Invoke-AzSpotPlacementScore.ps1 @@ -243,8 +243,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Compute/Compute.Autorest/exports/New-AzGalleryApplication.ps1 b/generated/Compute/Compute.Autorest/exports/New-AzGalleryApplication.ps1 index 63d140f672ed..846ca0cde581 100644 --- a/generated/Compute/Compute.Autorest/exports/New-AzGalleryApplication.ps1 +++ b/generated/Compute/Compute.Autorest/exports/New-AzGalleryApplication.ps1 @@ -218,8 +218,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Compute/Compute.Autorest/exports/New-AzGalleryApplicationVersion.ps1 b/generated/Compute/Compute.Autorest/exports/New-AzGalleryApplicationVersion.ps1 index 697ada065f01..6172f1bfef9d 100644 --- a/generated/Compute/Compute.Autorest/exports/New-AzGalleryApplicationVersion.ps1 +++ b/generated/Compute/Compute.Autorest/exports/New-AzGalleryApplicationVersion.ps1 @@ -354,8 +354,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Compute/Compute.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/Compute/Compute.Autorest/exports/ProxyCmdletDefinitions.ps1 index c08a9c8f1499..b29b29b99038 100644 --- a/generated/Compute/Compute.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/Compute/Compute.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -217,8 +217,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -467,8 +466,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -783,8 +781,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1077,8 +1074,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1339,8 +1335,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1599,8 +1594,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1889,8 +1883,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2287,8 +2280,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2691,8 +2683,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2987,8 +2978,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -3279,8 +3269,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -3706,8 +3695,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -4106,8 +4094,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Compute/Compute.Autorest/exports/Remove-AzGalleryApplication.ps1 b/generated/Compute/Compute.Autorest/exports/Remove-AzGalleryApplication.ps1 index 2a6c0850bb9f..e7007680676f 100644 --- a/generated/Compute/Compute.Autorest/exports/Remove-AzGalleryApplication.ps1 +++ b/generated/Compute/Compute.Autorest/exports/Remove-AzGalleryApplication.ps1 @@ -189,8 +189,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Compute/Compute.Autorest/exports/Remove-AzGalleryApplicationVersion.ps1 b/generated/Compute/Compute.Autorest/exports/Remove-AzGalleryApplicationVersion.ps1 index 6b50f3efd6f6..e9960953056d 100644 --- a/generated/Compute/Compute.Autorest/exports/Remove-AzGalleryApplicationVersion.ps1 +++ b/generated/Compute/Compute.Autorest/exports/Remove-AzGalleryApplicationVersion.ps1 @@ -219,8 +219,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Compute/Compute.Autorest/exports/Remove-AzVMRunCommand.ps1 b/generated/Compute/Compute.Autorest/exports/Remove-AzVMRunCommand.ps1 index 4bd0f2249af9..37bf457c290c 100644 --- a/generated/Compute/Compute.Autorest/exports/Remove-AzVMRunCommand.ps1 +++ b/generated/Compute/Compute.Autorest/exports/Remove-AzVMRunCommand.ps1 @@ -188,8 +188,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Compute/Compute.Autorest/exports/Remove-AzVmssVMRunCommand.ps1 b/generated/Compute/Compute.Autorest/exports/Remove-AzVmssVMRunCommand.ps1 index 75afb814d5ff..50e3a943f439 100644 --- a/generated/Compute/Compute.Autorest/exports/Remove-AzVmssVMRunCommand.ps1 +++ b/generated/Compute/Compute.Autorest/exports/Remove-AzVmssVMRunCommand.ps1 @@ -218,8 +218,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Compute/Compute.Autorest/exports/Set-AzVMRunCommand.ps1 b/generated/Compute/Compute.Autorest/exports/Set-AzVMRunCommand.ps1 index 1245e1ec72e3..876fd763818a 100644 --- a/generated/Compute/Compute.Autorest/exports/Set-AzVMRunCommand.ps1 +++ b/generated/Compute/Compute.Autorest/exports/Set-AzVMRunCommand.ps1 @@ -325,8 +325,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Compute/Compute.Autorest/exports/Set-AzVmssVMRunCommand.ps1 b/generated/Compute/Compute.Autorest/exports/Set-AzVmssVMRunCommand.ps1 index db0b1243acce..47648f3f8b09 100644 --- a/generated/Compute/Compute.Autorest/exports/Set-AzVmssVMRunCommand.ps1 +++ b/generated/Compute/Compute.Autorest/exports/Set-AzVmssVMRunCommand.ps1 @@ -331,8 +331,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Compute/Compute.Autorest/exports/Update-AzGalleryApplication.ps1 b/generated/Compute/Compute.Autorest/exports/Update-AzGalleryApplication.ps1 index e96e6e36c49a..e0e5615f2a61 100644 --- a/generated/Compute/Compute.Autorest/exports/Update-AzGalleryApplication.ps1 +++ b/generated/Compute/Compute.Autorest/exports/Update-AzGalleryApplication.ps1 @@ -223,8 +223,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Compute/Compute.Autorest/exports/Update-AzGalleryApplicationVersion.ps1 b/generated/Compute/Compute.Autorest/exports/Update-AzGalleryApplicationVersion.ps1 index d7c21637f07c..361df99c5afd 100644 --- a/generated/Compute/Compute.Autorest/exports/Update-AzGalleryApplicationVersion.ps1 +++ b/generated/Compute/Compute.Autorest/exports/Update-AzGalleryApplicationVersion.ps1 @@ -326,8 +326,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index b9cfc039a886..189f564f5ba1 100644 --- a/generated/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -218,13 +218,12 @@ public string GetProcessCustomAttributesAtRuntime() private string GetLoginVerification() { - if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + 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}{Indent}throw ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" {Indent}{Indent}}} "; } diff --git a/generated/EventHub/EventHub.Autorest/Properties/AssemblyInfo.cs b/generated/EventHub/EventHub.Autorest/Properties/AssemblyInfo.cs index fa54d7338d48..174ed0c005fa 100644 --- a/generated/EventHub/EventHub.Autorest/Properties/AssemblyInfo.cs +++ b/generated/EventHub/EventHub.Autorest/Properties/AssemblyInfo.cs @@ -23,4 +23,4 @@ [assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("0.1.0.0")] [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] -[assembly: System.CLSCompliantAttribute(false)] \ No newline at end of file +[assembly: System.CLSCompliantAttribute(false)] diff --git a/generated/EventHub/EventHub.Autorest/exports/Approve-AzEventHubPrivateEndpointConnection.ps1 b/generated/EventHub/EventHub.Autorest/exports/Approve-AzEventHubPrivateEndpointConnection.ps1 index a261c39aacc2..ee0a805ad46b 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Approve-AzEventHubPrivateEndpointConnection.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Approve-AzEventHubPrivateEndpointConnection.ps1 @@ -167,8 +167,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Deny-AzEventHubPrivateEndpointConnection.ps1 b/generated/EventHub/EventHub.Autorest/exports/Deny-AzEventHubPrivateEndpointConnection.ps1 index 8e436ded721e..dc304a984e43 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Deny-AzEventHubPrivateEndpointConnection.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Deny-AzEventHubPrivateEndpointConnection.ps1 @@ -167,8 +167,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHub.ps1 b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHub.ps1 index 6ad0d1adec31..d12e35a4b57f 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHub.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHub.ps1 @@ -187,8 +187,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubApplicationGroup.ps1 b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubApplicationGroup.ps1 index 5344e44031ba..03e8c1ab0c15 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubApplicationGroup.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubApplicationGroup.ps1 @@ -174,8 +174,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubAuthorizationRule.ps1 b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubAuthorizationRule.ps1 index a2dedbde26ac..b868f122a71a 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubAuthorizationRule.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubAuthorizationRule.ps1 @@ -169,8 +169,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubCluster.ps1 b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubCluster.ps1 index 538e7960a18f..f22e85fb7010 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubCluster.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubCluster.ps1 @@ -144,8 +144,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubClusterNamespace.ps1 b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubClusterNamespace.ps1 index 462cdc136403..1597f0ee36b4 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubClusterNamespace.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubClusterNamespace.ps1 @@ -113,8 +113,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubClustersAvailableRegion.ps1 b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubClustersAvailableRegion.ps1 index f8c44a0648d0..79f52cfa1ffb 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubClustersAvailableRegion.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubClustersAvailableRegion.ps1 @@ -101,8 +101,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubConsumerGroup.ps1 b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubConsumerGroup.ps1 index 4384db59712a..4e0f23a212de 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubConsumerGroup.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubConsumerGroup.ps1 @@ -217,8 +217,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubGeoDRConfiguration.ps1 b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubGeoDRConfiguration.ps1 index cc08ba542c5d..d85fcebc0228 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubGeoDRConfiguration.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubGeoDRConfiguration.ps1 @@ -171,8 +171,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubKey.ps1 b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubKey.ps1 index 62b4bd984a4e..91b8e97748e1 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubKey.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubKey.ps1 @@ -145,8 +145,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubNamespace.ps1 b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubNamespace.ps1 index 14031f28641d..ddbd2f0c1d07 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubNamespace.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubNamespace.ps1 @@ -149,8 +149,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubNetworkRuleSet.ps1 b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubNetworkRuleSet.ps1 index be9a7ee75f8b..ed1e11face3f 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubNetworkRuleSet.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubNetworkRuleSet.ps1 @@ -145,8 +145,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubNetworkSecurityPerimeterConfiguration.ps1 b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubNetworkSecurityPerimeterConfiguration.ps1 index a80a1cb6c3b7..cccc38ce1410 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubNetworkSecurityPerimeterConfiguration.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubNetworkSecurityPerimeterConfiguration.ps1 @@ -113,8 +113,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubNetworkSecurityPerimeterConfigurationsForAssociation.ps1 b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubNetworkSecurityPerimeterConfigurationsForAssociation.ps1 index f5cb117c8761..2d71346359b3 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubNetworkSecurityPerimeterConfigurationsForAssociation.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubNetworkSecurityPerimeterConfigurationsForAssociation.ps1 @@ -168,8 +168,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubPrivateEndpointConnection.ps1 b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubPrivateEndpointConnection.ps1 index b884c9116e82..add40adb629f 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubPrivateEndpointConnection.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubPrivateEndpointConnection.ps1 @@ -178,8 +178,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubPrivateLink.ps1 b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubPrivateLink.ps1 index d21267d65a1a..bd8d58a60f63 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubPrivateLink.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubPrivateLink.ps1 @@ -115,8 +115,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubSchemaGroup.ps1 b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubSchemaGroup.ps1 index 09374af93192..841a5808327c 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubSchemaGroup.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Get-AzEventHubSchemaGroup.ps1 @@ -187,8 +187,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHub.ps1 b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHub.ps1 index 37cbd312553a..a2f3d9927c45 100644 --- a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHub.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHub.ps1 @@ -338,8 +338,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubApplicationGroup.ps1 b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubApplicationGroup.ps1 index def281fee84d..2003a4bccad4 100644 --- a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubApplicationGroup.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubApplicationGroup.ps1 @@ -191,8 +191,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubAuthorizationRule.ps1 b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubAuthorizationRule.ps1 index d9a3bc2f59a2..2cf640803cd5 100644 --- a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubAuthorizationRule.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubAuthorizationRule.ps1 @@ -145,8 +145,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubCluster.ps1 b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubCluster.ps1 index bd15536da8bd..952424624bbf 100644 --- a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubCluster.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubCluster.ps1 @@ -154,8 +154,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubConsumerGroup.ps1 b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubConsumerGroup.ps1 index 747c12809f25..1a4aadbddd77 100644 --- a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubConsumerGroup.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubConsumerGroup.ps1 @@ -200,8 +200,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubGeoDRConfiguration.ps1 b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubGeoDRConfiguration.ps1 index f7eedae11337..674662ba25f3 100644 --- a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubGeoDRConfiguration.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubGeoDRConfiguration.ps1 @@ -173,8 +173,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubIPRuleConfig.ps1 b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubIPRuleConfig.ps1 index b4ba0bcabfc2..4a9e6c6b190f 100644 --- a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubIPRuleConfig.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubIPRuleConfig.ps1 @@ -57,8 +57,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubKey.ps1 b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubKey.ps1 index 1e0698ca10a6..19f0585693c2 100644 --- a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubKey.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubKey.ps1 @@ -152,8 +152,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubNamespace.ps1 b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubNamespace.ps1 index 6b38243b9ad5..cfcb6ca5eabe 100644 --- a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubNamespace.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubNamespace.ps1 @@ -262,8 +262,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubSchemaGroup.ps1 b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubSchemaGroup.ps1 index f6826ca9c431..9967565591de 100644 --- a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubSchemaGroup.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubSchemaGroup.ps1 @@ -186,8 +186,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubThrottlingPolicyConfig.ps1 b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubThrottlingPolicyConfig.ps1 index 39c90e7ecb5f..7becba34c4ac 100644 --- a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubThrottlingPolicyConfig.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubThrottlingPolicyConfig.ps1 @@ -63,8 +63,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubVirtualNetworkRuleConfig.ps1 b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubVirtualNetworkRuleConfig.ps1 index f41f1ef7759d..0c3386b56cac 100644 --- a/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubVirtualNetworkRuleConfig.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/New-AzEventHubVirtualNetworkRuleConfig.ps1 @@ -57,8 +57,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/EventHub/EventHub.Autorest/exports/ProxyCmdletDefinitions.ps1 index 1f55897379ad..a2b3af325cda 100644 --- a/generated/EventHub/EventHub.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -174,8 +174,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -360,8 +359,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -531,8 +529,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -745,8 +742,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1035,8 +1031,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1280,8 +1275,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1502,8 +1496,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1720,8 +1713,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1960,8 +1952,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2145,8 +2136,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2393,8 +2383,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2581,8 +2570,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2838,8 +2826,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -3098,8 +3085,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -3362,8 +3348,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -3588,8 +3573,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -3861,8 +3845,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -4108,8 +4091,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -4366,8 +4348,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -4776,8 +4757,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -5023,8 +5003,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -5256,8 +5235,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -5531,8 +5509,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -5778,8 +5755,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -6015,8 +5991,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -6277,8 +6252,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -6524,8 +6498,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -6771,8 +6744,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -7010,8 +6982,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -7248,8 +7219,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -7488,8 +7458,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -7706,8 +7675,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -7923,8 +7891,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -8051,8 +8018,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -8266,8 +8232,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -8847,8 +8812,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -8980,8 +8944,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -9100,8 +9063,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -9334,8 +9296,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -9685,8 +9646,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -9950,8 +9910,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -10198,8 +10157,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -10441,8 +10399,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -10688,8 +10645,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -10917,8 +10873,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -11146,8 +11101,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -11497,8 +11451,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -11769,8 +11722,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -12006,8 +11958,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -12208,8 +12159,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHub.ps1 b/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHub.ps1 index 3965beb3ea92..3a25b1175e0a 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHub.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHub.ps1 @@ -175,8 +175,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubApplicationGroup.ps1 b/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubApplicationGroup.ps1 index 512ece0cb7b6..b83f5886aecb 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubApplicationGroup.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubApplicationGroup.ps1 @@ -175,8 +175,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubAuthorizationRule.ps1 b/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubAuthorizationRule.ps1 index 4832558a3fa4..da95453b623b 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubAuthorizationRule.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubAuthorizationRule.ps1 @@ -171,8 +171,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubCluster.ps1 b/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubCluster.ps1 index b015d2444e12..7118140f60ae 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubCluster.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubCluster.ps1 @@ -161,8 +161,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubConsumerGroup.ps1 b/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubConsumerGroup.ps1 index 80c146d6fd17..8bdd9e783279 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubConsumerGroup.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubConsumerGroup.ps1 @@ -204,8 +204,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubGeoDRConfiguration.ps1 b/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubGeoDRConfiguration.ps1 index c7f7f4547233..d913be4efb3f 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubGeoDRConfiguration.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubGeoDRConfiguration.ps1 @@ -174,8 +174,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubNamespace.ps1 b/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubNamespace.ps1 index e9a35f734273..b32d9313a1bc 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubNamespace.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubNamespace.ps1 @@ -165,8 +165,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubPrivateEndpointConnection.ps1 b/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubPrivateEndpointConnection.ps1 index a434031b3001..902cb7ce4fa7 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubPrivateEndpointConnection.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubPrivateEndpointConnection.ps1 @@ -191,8 +191,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubSchemaGroup.ps1 b/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubSchemaGroup.ps1 index 79f38c94e38f..b724b41947b8 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubSchemaGroup.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Remove-AzEventHubSchemaGroup.ps1 @@ -175,8 +175,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHub.ps1 b/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHub.ps1 index 843495a87474..1fccf9ac6785 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHub.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHub.ps1 @@ -279,8 +279,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubApplicationGroup.ps1 b/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubApplicationGroup.ps1 index c95221838a03..4b62184c12e9 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubApplicationGroup.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubApplicationGroup.ps1 @@ -194,8 +194,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubAuthorizationRule.ps1 b/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubAuthorizationRule.ps1 index 48cd07761edc..51cf317a0a92 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubAuthorizationRule.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubAuthorizationRule.ps1 @@ -177,8 +177,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubCluster.ps1 b/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubCluster.ps1 index 3dbc00485d4e..e7b7b9851849 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubCluster.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubCluster.ps1 @@ -171,8 +171,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubConsumerGroup.ps1 b/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubConsumerGroup.ps1 index 357ebbc18128..c47eabee8f56 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubConsumerGroup.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubConsumerGroup.ps1 @@ -176,8 +176,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubGeoDRConfigurationBreakPair.ps1 b/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubGeoDRConfigurationBreakPair.ps1 index c86edd28dbd3..a5185b3b29d2 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubGeoDRConfigurationBreakPair.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubGeoDRConfigurationBreakPair.ps1 @@ -158,8 +158,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubGeoDRConfigurationFailOver.ps1 b/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubGeoDRConfigurationFailOver.ps1 index effe195d52f6..fdec0a45ea0d 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubGeoDRConfigurationFailOver.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubGeoDRConfigurationFailOver.ps1 @@ -158,8 +158,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubNamespace.ps1 b/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubNamespace.ps1 index 7d82896bbf4c..4c4836260841 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubNamespace.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubNamespace.ps1 @@ -280,8 +280,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubNetworkRuleSet.ps1 b/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubNetworkRuleSet.ps1 index ee7480c1715b..18b84e9bba83 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubNetworkRuleSet.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Set-AzEventHubNetworkRuleSet.ps1 @@ -201,8 +201,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Start-AzEventHubNamespaceFailOver.ps1 b/generated/EventHub/EventHub.Autorest/exports/Start-AzEventHubNamespaceFailOver.ps1 index d7c8633b2a01..efff212a71c6 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Start-AzEventHubNamespaceFailOver.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Start-AzEventHubNamespaceFailOver.ps1 @@ -166,8 +166,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/exports/Test-AzEventHubName.ps1 b/generated/EventHub/EventHub.Autorest/exports/Test-AzEventHubName.ps1 index 5e5324e8eaef..03d3875ffee8 100644 --- a/generated/EventHub/EventHub.Autorest/exports/Test-AzEventHubName.ps1 +++ b/generated/EventHub/EventHub.Autorest/exports/Test-AzEventHubName.ps1 @@ -131,8 +131,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_Break.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_Break.cs index 6c8cba76e1b3..3cc19c77e68a 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_Break.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_Break.cs @@ -504,7 +504,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/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentity.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentity.cs index 9d4a05523389..4dc68725fe57 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentity.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentity.cs @@ -473,7 +473,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/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace.cs index a5b2b29e281a..07348dd17802 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace.cs @@ -484,7 +484,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/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_Fail.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_Fail.cs index e19858e069e5..f9458e3b4f82 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_Fail.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_Fail.cs @@ -504,7 +504,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/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentity.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentity.cs index ec3a69fdd0c0..585c17b8bc27 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentity.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentity.cs @@ -473,7 +473,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/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentityNamespace.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentityNamespace.cs index 845f42de7ceb..eadf6f67898d 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentityNamespace.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentityNamespace.cs @@ -484,7 +484,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/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNetworkSecurityPerimeterConfiguration_CreateViaIdentity.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNetworkSecurityPerimeterConfiguration_CreateViaIdentity.cs index 94a528ac6cb4..216e8f03a729 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNetworkSecurityPerimeterConfiguration_CreateViaIdentity.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNetworkSecurityPerimeterConfiguration_CreateViaIdentity.cs @@ -538,7 +538,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/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNetworkSecurityPerimeterConfiguration_CreateViaIdentityNamespace.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNetworkSecurityPerimeterConfiguration_CreateViaIdentityNamespace.cs index 777662228e66..2f3681ecfd31 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNetworkSecurityPerimeterConfiguration_CreateViaIdentityNamespace.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNetworkSecurityPerimeterConfiguration_CreateViaIdentityNamespace.cs @@ -550,7 +550,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_Delete.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_Delete.cs index 8810702f2d49..dd9b859a0c52 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_Delete.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_Delete.cs @@ -512,7 +512,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -536,7 +536,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_DeleteViaIdentity.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_DeleteViaIdentity.cs index b169464365a6..12bdda7b951a 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_DeleteViaIdentity.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_DeleteViaIdentity.cs @@ -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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_DeleteViaIdentityNamespace.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_DeleteViaIdentityNamespace.cs index 8eb635ab8af4..28643ecea455 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_DeleteViaIdentityNamespace.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_DeleteViaIdentityNamespace.cs @@ -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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_Delete.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_Delete.cs index bc12792dbe6d..dc38d9ef66d1 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_Delete.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_Delete.cs @@ -526,7 +526,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -550,7 +550,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentity.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentity.cs index 2415d9f53b7c..f9a013b2dfae 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentity.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentity.cs @@ -484,7 +484,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -508,7 +508,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentityEventhub.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentityEventhub.cs index 367db6f4e553..6055f6b087c9 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentityEventhub.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentityEventhub.cs @@ -495,7 +495,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 +519,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentityNamespace.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentityNamespace.cs index 5b2e2b153441..02cb19163580 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentityNamespace.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentityNamespace.cs @@ -505,7 +505,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -529,7 +529,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubCluster_Delete.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubCluster_Delete.cs index 6326753db91f..7026985a2e38 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubCluster_Delete.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubCluster_Delete.cs @@ -566,7 +566,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -590,7 +590,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubCluster_DeleteViaIdentity.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubCluster_DeleteViaIdentity.cs index f7de8e652969..d7d3beeb5ec0 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubCluster_DeleteViaIdentity.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubCluster_DeleteViaIdentity.cs @@ -540,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); } @@ -564,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_Delete.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_Delete.cs index 4cf4b64ddad3..fe48f551dab6 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_Delete.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_Delete.cs @@ -526,7 +526,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -550,7 +550,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentity.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentity.cs index 07fbe792f3e0..86857b2c192c 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentity.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentity.cs @@ -483,7 +483,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -507,7 +507,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentityEventhub.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentityEventhub.cs index 6924cd03f0a8..25a81a8b74e8 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentityEventhub.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentityEventhub.cs @@ -495,7 +495,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 +519,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentityNamespace.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentityNamespace.cs index a57d36a37d7a..33007d36af75 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentityNamespace.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentityNamespace.cs @@ -505,7 +505,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -529,7 +529,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_Delete.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_Delete.cs index 8a2da88fde29..2250e8fb7244 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_Delete.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_Delete.cs @@ -511,7 +511,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -535,7 +535,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentity.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentity.cs index fe91fcecc1eb..748bdc78a3d2 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentity.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentity.cs @@ -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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentityNamespace.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentityNamespace.cs index 28dd11c95c27..6e20948b21c7 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentityNamespace.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentityNamespace.cs @@ -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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_Delete.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_Delete.cs index c288c8f8a87c..752a1fd3161c 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_Delete.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_Delete.cs @@ -512,7 +512,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -536,7 +536,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentity.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentity.cs index 4a2e78c2056d..1e765446b45d 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentity.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentity.cs @@ -480,7 +480,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -504,7 +504,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentityNamespace.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentityNamespace.cs index ab88450cf955..5b6a2436e74a 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentityNamespace.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentityNamespace.cs @@ -492,7 +492,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -516,7 +516,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespace_Delete.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespace_Delete.cs index bba7f57f44e1..f24de39df953 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespace_Delete.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespace_Delete.cs @@ -569,7 +569,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -593,7 +593,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespace_DeleteViaIdentity.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespace_DeleteViaIdentity.cs index 0c7891d89f91..f2d6d5c38d8d 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespace_DeleteViaIdentity.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespace_DeleteViaIdentity.cs @@ -543,7 +543,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -567,7 +567,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_Delete.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_Delete.cs index a2c65b4149aa..4d2c8eb4d3cd 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_Delete.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_Delete.cs @@ -584,7 +584,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -608,7 +608,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentity.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentity.cs index b9832cb5b07b..4a1d85b0d9e2 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentity.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentity.cs @@ -549,7 +549,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -573,7 +573,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentityNamespace.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentityNamespace.cs index f1d28ca2f638..fc72579da44e 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentityNamespace.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentityNamespace.cs @@ -563,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); } @@ -587,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_Delete.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_Delete.cs index 72091341b135..c2f0195e1fc0 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_Delete.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_Delete.cs @@ -512,7 +512,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -536,7 +536,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_DeleteViaIdentity.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_DeleteViaIdentity.cs index 17a732734459..9850756a3c64 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_DeleteViaIdentity.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_DeleteViaIdentity.cs @@ -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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_DeleteViaIdentityNamespace.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_DeleteViaIdentityNamespace.cs index 58094bf3a214..d1a34755fb98 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_DeleteViaIdentityNamespace.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_DeleteViaIdentityNamespace.cs @@ -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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_Delete.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_Delete.cs index 6f0f068ab3e8..9894413ef3c7 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_Delete.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_Delete.cs @@ -512,7 +512,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -536,7 +536,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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_DeleteViaIdentity.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_DeleteViaIdentity.cs index 3cf8b45f4908..1f17a4e4df19 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_DeleteViaIdentity.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_DeleteViaIdentity.cs @@ -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/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_DeleteViaIdentityNamespace.cs b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_DeleteViaIdentityNamespace.cs index 354fb65038bc..f36cc5bc631b 100644 --- a/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_DeleteViaIdentityNamespace.cs +++ b/generated/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_DeleteViaIdentityNamespace.cs @@ -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/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 11507019ceb8..c61d8d86518b 100644 --- a/generated/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -218,13 +218,12 @@ public string GetProcessCustomAttributesAtRuntime() private string GetLoginVerification() { - if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + 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}{Indent}throw ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" {Indent}{Indent}}} "; } diff --git a/generated/EventHub/EventHub.Autorest/generated/runtime/Context.cs b/generated/EventHub/EventHub.Autorest/generated/runtime/Context.cs index 5e796e931ea4..ee6b010db25a 100644 --- a/generated/EventHub/EventHub.Autorest/generated/runtime/Context.cs +++ b/generated/EventHub/EventHub.Autorest/generated/runtime/Context.cs @@ -20,7 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime /// The IContext Interface defines the communication mechanism for input customization. /// /// - /// In the context, we will have client, pipeline, PSBoundParamters, default EventListener, Cancellation. + /// In the context, we will have client, pipeline, PSBoundParameters, default EventListener, Cancellation. /// public interface IContext { diff --git a/generated/KeyVault/KeyVault.Autorest/exports/Add-AzKeyVaultManagedHsmRegion.ps1 b/generated/KeyVault/KeyVault.Autorest/exports/Add-AzKeyVaultManagedHsmRegion.ps1 index b019af52a199..52fbfcef5d8d 100644 --- a/generated/KeyVault/KeyVault.Autorest/exports/Add-AzKeyVaultManagedHsmRegion.ps1 +++ b/generated/KeyVault/KeyVault.Autorest/exports/Add-AzKeyVaultManagedHsmRegion.ps1 @@ -126,8 +126,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/KeyVault/KeyVault.Autorest/exports/Get-AzKeyVaultManagedHsmRegion.ps1 b/generated/KeyVault/KeyVault.Autorest/exports/Get-AzKeyVaultManagedHsmRegion.ps1 index e17446fe92ae..4e9fd4c4d81b 100644 --- a/generated/KeyVault/KeyVault.Autorest/exports/Get-AzKeyVaultManagedHsmRegion.ps1 +++ b/generated/KeyVault/KeyVault.Autorest/exports/Get-AzKeyVaultManagedHsmRegion.ps1 @@ -113,8 +113,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/KeyVault/KeyVault.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/KeyVault/KeyVault.Autorest/exports/ProxyCmdletDefinitions.ps1 index 4df03977b433..01ae80d36bae 100644 --- a/generated/KeyVault/KeyVault.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/KeyVault/KeyVault.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -113,8 +113,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -304,8 +303,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -497,8 +495,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -695,8 +692,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -896,8 +892,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/KeyVault/KeyVault.Autorest/exports/Remove-AzKeyVaultManagedHsmRegion.ps1 b/generated/KeyVault/KeyVault.Autorest/exports/Remove-AzKeyVaultManagedHsmRegion.ps1 index f5e341c6d12a..469efb0d63cd 100644 --- a/generated/KeyVault/KeyVault.Autorest/exports/Remove-AzKeyVaultManagedHsmRegion.ps1 +++ b/generated/KeyVault/KeyVault.Autorest/exports/Remove-AzKeyVaultManagedHsmRegion.ps1 @@ -131,8 +131,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/KeyVault/KeyVault.Autorest/exports/Test-AzKeyVaultManagedHsmNameAvailability.ps1 b/generated/KeyVault/KeyVault.Autorest/exports/Test-AzKeyVaultManagedHsmNameAvailability.ps1 index bafc0be375ec..7f0cd198232e 100644 --- a/generated/KeyVault/KeyVault.Autorest/exports/Test-AzKeyVaultManagedHsmNameAvailability.ps1 +++ b/generated/KeyVault/KeyVault.Autorest/exports/Test-AzKeyVaultManagedHsmNameAvailability.ps1 @@ -121,8 +121,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/KeyVault/KeyVault.Autorest/exports/Test-AzKeyVaultNameAvailability.ps1 b/generated/KeyVault/KeyVault.Autorest/exports/Test-AzKeyVaultNameAvailability.ps1 index 0d368bb68aeb..57c1f88abd74 100644 --- a/generated/KeyVault/KeyVault.Autorest/exports/Test-AzKeyVaultNameAvailability.ps1 +++ b/generated/KeyVault/KeyVault.Autorest/exports/Test-AzKeyVaultNameAvailability.ps1 @@ -121,8 +121,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/KeyVault/KeyVault.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/KeyVault/KeyVault.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 817355c88c2c..c8dd17bf5a9b 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -218,13 +218,12 @@ public string GetProcessCustomAttributesAtRuntime() private string GetLoginVerification() { - if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + 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}{Indent}throw ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" {Indent}{Indent}}} "; } diff --git a/generated/KeyVault/KeyVault.Autorest/generated/runtime/Context.cs b/generated/KeyVault/KeyVault.Autorest/generated/runtime/Context.cs index f5a4eabf0568..b38676352acc 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/runtime/Context.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/runtime/Context.cs @@ -20,7 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime /// The IContext Interface defines the communication mechanism for input customization. /// /// - /// In the context, we will have client, pipeline, PSBoundParamters, default EventListener, Cancellation. + /// In the context, we will have client, pipeline, PSBoundParameters, default EventListener, Cancellation. /// public interface IContext { diff --git a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Get-AzFederatedIdentityCredential.ps1 b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Get-AzFederatedIdentityCredential.ps1 index e33978e43c32..f6f1f0cf5453 100644 --- a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Get-AzFederatedIdentityCredential.ps1 +++ b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Get-AzFederatedIdentityCredential.ps1 @@ -162,8 +162,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Get-AzSystemAssignedIdentity.ps1 b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Get-AzSystemAssignedIdentity.ps1 index a7618bb14ed7..24fe678c3083 100644 --- a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Get-AzSystemAssignedIdentity.ps1 +++ b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Get-AzSystemAssignedIdentity.ps1 @@ -100,8 +100,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Get-AzUserAssignedIdentity.ps1 b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Get-AzUserAssignedIdentity.ps1 index 1699467cb2cb..bd9dad9b68b9 100644 --- a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Get-AzUserAssignedIdentity.ps1 +++ b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Get-AzUserAssignedIdentity.ps1 @@ -142,8 +142,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Get-AzUserAssignedIdentityAssociatedResource.ps1 b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Get-AzUserAssignedIdentityAssociatedResource.ps1 index 07bfa01df97e..8da24ee09a5e 100644 --- a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Get-AzUserAssignedIdentityAssociatedResource.ps1 +++ b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Get-AzUserAssignedIdentityAssociatedResource.ps1 @@ -146,8 +146,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/New-AzFederatedIdentityCredential.ps1 b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/New-AzFederatedIdentityCredential.ps1 index 10eaf70c30e9..bd67c96e2e68 100644 --- a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/New-AzFederatedIdentityCredential.ps1 +++ b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/New-AzFederatedIdentityCredential.ps1 @@ -157,8 +157,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/New-AzUserAssignedIdentity.ps1 b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/New-AzUserAssignedIdentity.ps1 index 1dcdf3db79ea..a5633ed858b5 100644 --- a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/New-AzUserAssignedIdentity.ps1 +++ b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/New-AzUserAssignedIdentity.ps1 @@ -137,8 +137,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/ProxyCmdletDefinitions.ps1 index 25f9568a7e7c..fa46ff858810 100644 --- a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -162,8 +162,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -334,8 +333,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -543,8 +541,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -755,8 +752,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -985,8 +981,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1197,8 +1192,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1417,8 +1411,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1628,8 +1621,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1886,8 +1878,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2129,8 +2120,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Remove-AzFederatedIdentityCredential.ps1 b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Remove-AzFederatedIdentityCredential.ps1 index 943ae35f2420..c38ee47ba09a 100644 --- a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Remove-AzFederatedIdentityCredential.ps1 +++ b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Remove-AzFederatedIdentityCredential.ps1 @@ -148,8 +148,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Remove-AzUserAssignedIdentity.ps1 b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Remove-AzUserAssignedIdentity.ps1 index 729e30c8f34d..7852712d2bf3 100644 --- a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Remove-AzUserAssignedIdentity.ps1 +++ b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Remove-AzUserAssignedIdentity.ps1 @@ -140,8 +140,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Update-AzFederatedIdentityCredential.ps1 b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Update-AzFederatedIdentityCredential.ps1 index aadb93a1830e..35f247a03132 100644 --- a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Update-AzFederatedIdentityCredential.ps1 +++ b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Update-AzFederatedIdentityCredential.ps1 @@ -187,8 +187,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Update-AzUserAssignedIdentity.ps1 b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Update-AzUserAssignedIdentity.ps1 index 5cb95897856a..e025857017dd 100644 --- a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Update-AzUserAssignedIdentity.ps1 +++ b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/exports/Update-AzUserAssignedIdentity.ps1 @@ -167,8 +167,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/cmdlets/RemoveAzFederatedIdentityCredential_Delete.cs b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/cmdlets/RemoveAzFederatedIdentityCredential_Delete.cs index 0ee7d7ad88c3..10541602c4e7 100644 --- a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/cmdlets/RemoveAzFederatedIdentityCredential_Delete.cs +++ b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/cmdlets/RemoveAzFederatedIdentityCredential_Delete.cs @@ -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/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/cmdlets/RemoveAzFederatedIdentityCredential_DeleteViaIdentity.cs b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/cmdlets/RemoveAzFederatedIdentityCredential_DeleteViaIdentity.cs index af7ea56b4747..c3ad42fe645b 100644 --- a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/cmdlets/RemoveAzFederatedIdentityCredential_DeleteViaIdentity.cs +++ b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/cmdlets/RemoveAzFederatedIdentityCredential_DeleteViaIdentity.cs @@ -480,7 +480,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -504,7 +504,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/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/cmdlets/RemoveAzUserAssignedIdentity_Delete.cs b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/cmdlets/RemoveAzUserAssignedIdentity_Delete.cs index 0789d95311e5..6c38656b0699 100644 --- a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/cmdlets/RemoveAzUserAssignedIdentity_Delete.cs +++ b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/cmdlets/RemoveAzUserAssignedIdentity_Delete.cs @@ -494,7 +494,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -518,7 +518,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/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/cmdlets/RemoveAzUserAssignedIdentity_DeleteViaIdentity.cs b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/cmdlets/RemoveAzUserAssignedIdentity_DeleteViaIdentity.cs index 5b40405e7165..de38a9eef769 100644 --- a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/cmdlets/RemoveAzUserAssignedIdentity_DeleteViaIdentity.cs +++ b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/cmdlets/RemoveAzUserAssignedIdentity_DeleteViaIdentity.cs @@ -475,7 +475,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 +499,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/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 56ba8c16f688..b71273008b9e 100644 --- a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -218,13 +218,12 @@ public string GetProcessCustomAttributesAtRuntime() private string GetLoginVerification() { - if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + 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}{Indent}throw ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" {Indent}{Indent}}} "; } diff --git a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/runtime/Context.cs b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/runtime/Context.cs index 3c8509643eea..aa30417f9a04 100644 --- a/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/runtime/Context.cs +++ b/generated/ManagedServiceIdentity/ManagedServiceIdentity.Autorest/generated/runtime/Context.cs @@ -20,7 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime /// The IContext Interface defines the communication mechanism for input customization. /// /// - /// In the context, we will have client, pipeline, PSBoundParamters, default EventListener, Cancellation. + /// In the context, we will have client, pipeline, PSBoundParameters, default EventListener, Cancellation. /// public interface IContext { diff --git a/generated/Monitor/ActionGroup.Autorest/exports/Enable-AzActionGroupReceiver.ps1 b/generated/Monitor/ActionGroup.Autorest/exports/Enable-AzActionGroupReceiver.ps1 index f12f4e8934bd..f4f7e746cfbd 100644 --- a/generated/Monitor/ActionGroup.Autorest/exports/Enable-AzActionGroupReceiver.ps1 +++ b/generated/Monitor/ActionGroup.Autorest/exports/Enable-AzActionGroupReceiver.ps1 @@ -167,8 +167,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/ActionGroup.Autorest/exports/Get-AzActionGroup.ps1 b/generated/Monitor/ActionGroup.Autorest/exports/Get-AzActionGroup.ps1 index c34979870f13..02509a1c9213 100644 --- a/generated/Monitor/ActionGroup.Autorest/exports/Get-AzActionGroup.ps1 +++ b/generated/Monitor/ActionGroup.Autorest/exports/Get-AzActionGroup.ps1 @@ -138,8 +138,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/ActionGroup.Autorest/exports/New-AzActionGroup.ps1 b/generated/Monitor/ActionGroup.Autorest/exports/New-AzActionGroup.ps1 index e0b810d15075..492ba005ba38 100644 --- a/generated/Monitor/ActionGroup.Autorest/exports/New-AzActionGroup.ps1 +++ b/generated/Monitor/ActionGroup.Autorest/exports/New-AzActionGroup.ps1 @@ -346,8 +346,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/ActionGroup.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/Monitor/ActionGroup.Autorest/exports/ProxyCmdletDefinitions.ps1 index 553ccdfdc889..a6e48fe0759b 100644 --- a/generated/Monitor/ActionGroup.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/Monitor/ActionGroup.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -167,8 +167,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -378,8 +377,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -797,8 +795,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1009,8 +1006,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1387,8 +1383,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -3044,8 +3039,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/ActionGroup.Autorest/exports/Remove-AzActionGroup.ps1 b/generated/Monitor/ActionGroup.Autorest/exports/Remove-AzActionGroup.ps1 index 6e1962b33acc..f05a1367f72f 100644 --- a/generated/Monitor/ActionGroup.Autorest/exports/Remove-AzActionGroup.ps1 +++ b/generated/Monitor/ActionGroup.Autorest/exports/Remove-AzActionGroup.ps1 @@ -139,8 +139,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/ActionGroup.Autorest/exports/Test-AzActionGroup.ps1 b/generated/Monitor/ActionGroup.Autorest/exports/Test-AzActionGroup.ps1 index 54d9efd9811f..3956972a9202 100644 --- a/generated/Monitor/ActionGroup.Autorest/exports/Test-AzActionGroup.ps1 +++ b/generated/Monitor/ActionGroup.Autorest/exports/Test-AzActionGroup.ps1 @@ -160,8 +160,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/ActionGroup.Autorest/exports/Update-AzActionGroup.ps1 b/generated/Monitor/ActionGroup.Autorest/exports/Update-AzActionGroup.ps1 index bcdd442cfe86..51f5230b2b21 100644 --- a/generated/Monitor/ActionGroup.Autorest/exports/Update-AzActionGroup.ps1 +++ b/generated/Monitor/ActionGroup.Autorest/exports/Update-AzActionGroup.ps1 @@ -307,8 +307,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/ActionGroup.Autorest/generated/Module.cs b/generated/Monitor/ActionGroup.Autorest/generated/Module.cs index 75c6f2fb7c99..c68b75ac6418 100644 --- a/generated/Monitor/ActionGroup.Autorest/generated/Module.cs +++ b/generated/Monitor/ActionGroup.Autorest/generated/Module.cs @@ -68,7 +68,7 @@ public partial class Module public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Module Instance { get { if (_instance == null) { lock (_singletonLock) { if (_instance == null) { _instance = new Module(); }}} return _instance; } } /// The Name of this module - public string Name => @"Az.ActionGroup"; + public string Name => @"Az.Monitor"; /// The delegate to call when this module is loaded (supporting a commmon module). public ModuleLoadPipelineDelegate OnModuleLoad { get; set; } @@ -80,7 +80,7 @@ public partial class Module public global::System.String ProfileName { get; set; } /// The ResourceID for this module (azure arm). - public string ResourceId => @"Az.ActionGroup"; + public string ResourceId => @"Az.Monitor"; /// The delegate to call in WriteObject to sanitize the output object. public SanitizerDelegate SanitizeOutput { get; set; } diff --git a/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/EnableAzActionGroupReceiver_EnableExpanded.cs b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/EnableAzActionGroupReceiver_EnableExpanded.cs index ecf011b3f0f3..22878da65d0a 100644 --- a/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/EnableAzActionGroupReceiver_EnableExpanded.cs +++ b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/EnableAzActionGroupReceiver_EnableExpanded.cs @@ -501,7 +501,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/Monitor/ActionGroup.Autorest/generated/cmdlets/EnableAzActionGroupReceiver_EnableViaIdentityExpanded.cs b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/EnableAzActionGroupReceiver_EnableViaIdentityExpanded.cs index 92cc41ed24bb..6b894461928a 100644 --- a/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/EnableAzActionGroupReceiver_EnableViaIdentityExpanded.cs +++ b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/EnableAzActionGroupReceiver_EnableViaIdentityExpanded.cs @@ -482,7 +482,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/Monitor/ActionGroup.Autorest/generated/cmdlets/EnableAzActionGroupReceiver_EnableViaJsonFilePath.cs b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/EnableAzActionGroupReceiver_EnableViaJsonFilePath.cs index e1c6a02462fa..63ec228c6d81 100644 --- a/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/EnableAzActionGroupReceiver_EnableViaJsonFilePath.cs +++ b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/EnableAzActionGroupReceiver_EnableViaJsonFilePath.cs @@ -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/Monitor/ActionGroup.Autorest/generated/cmdlets/EnableAzActionGroupReceiver_EnableViaJsonString.cs b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/EnableAzActionGroupReceiver_EnableViaJsonString.cs index aa214c4e926e..efd906e88382 100644 --- a/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/EnableAzActionGroupReceiver_EnableViaJsonString.cs +++ b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/EnableAzActionGroupReceiver_EnableViaJsonString.cs @@ -501,7 +501,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/Monitor/ActionGroup.Autorest/generated/cmdlets/RemoveAzActionGroup_Delete.cs b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/RemoveAzActionGroup_Delete.cs index ae365b2fff22..26ac5e4c8d25 100644 --- a/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/RemoveAzActionGroup_Delete.cs +++ b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/RemoveAzActionGroup_Delete.cs @@ -495,7 +495,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 +519,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/Monitor/ActionGroup.Autorest/generated/cmdlets/RemoveAzActionGroup_DeleteViaIdentity.cs b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/RemoveAzActionGroup_DeleteViaIdentity.cs index 87381ba6850c..3715b55750a0 100644 --- a/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/RemoveAzActionGroup_DeleteViaIdentity.cs +++ b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/RemoveAzActionGroup_DeleteViaIdentity.cs @@ -475,7 +475,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 +499,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/Monitor/ActionGroup.Autorest/generated/cmdlets/TestAzActionGroup_CreateExpanded.cs b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/TestAzActionGroup_CreateExpanded.cs index 6366b5ecbb8f..ebe3575c5c15 100644 --- a/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/TestAzActionGroup_CreateExpanded.cs +++ b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/TestAzActionGroup_CreateExpanded.cs @@ -41,18 +41,9 @@ public partial class TestAzActionGroup_CreateExpanded : global::System.Managemen /// 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; - /// The request body which contain contact detail metadata private Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.INotificationRequestBody _notificationRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.NotificationRequestBody(); - /// - /// 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; - /// Backing field for property. private string _actionGroupName; @@ -400,11 +391,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Cmdlets.TestAzActi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -720,24 +706,7 @@ public TestAzActionGroup_CreateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.ITestNotificationDetailsResponse 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; - } - } + WriteObject(result, false); } } } diff --git a/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/TestAzActionGroup_CreateViaIdentityExpanded.cs b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/TestAzActionGroup_CreateViaIdentityExpanded.cs index 75dd49a0c478..477d1f1d94bb 100644 --- a/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/TestAzActionGroup_CreateViaIdentityExpanded.cs +++ b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/TestAzActionGroup_CreateViaIdentityExpanded.cs @@ -41,18 +41,9 @@ public partial class TestAzActionGroup_CreateViaIdentityExpanded : global::Syste /// 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; - /// The request body which contain contact detail metadata private Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.INotificationRequestBody _notificationRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.NotificationRequestBody(); - /// - /// 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; - /// /// The value of the supported alert type. Supported alert type values are: servicehealth, metricstaticthreshold, metricsdynamicthreshold, /// logalertv2, smartalert, webtestalert, logalertv1numresult, logalertv1metricmeasurement, resourcehealth, activitylog, actualcostbudget, @@ -358,11 +349,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Cmdlets.TestAzActi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -698,24 +684,7 @@ public TestAzActionGroup_CreateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.ITestNotificationDetailsResponse 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; - } - } + WriteObject(result, false); } } } diff --git a/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/TestAzActionGroup_CreateViaJsonFilePath.cs b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/TestAzActionGroup_CreateViaJsonFilePath.cs index 97df505faf98..4e99b9cea773 100644 --- a/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/TestAzActionGroup_CreateViaJsonFilePath.cs +++ b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/TestAzActionGroup_CreateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class TestAzActionGroup_CreateViaJsonFilePath : global::System.Ma /// 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; - public global::System.String _jsonString; - /// - /// 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; - /// Backing field for property. private string _actionGroupName; @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Cmdlets.TestAzActi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -583,24 +569,7 @@ public TestAzActionGroup_CreateViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.ITestNotificationDetailsResponse 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; - } - } + WriteObject(result, false); } } } diff --git a/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/TestAzActionGroup_CreateViaJsonString.cs b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/TestAzActionGroup_CreateViaJsonString.cs index 764b318acb9a..06de57a9666e 100644 --- a/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/TestAzActionGroup_CreateViaJsonString.cs +++ b/generated/Monitor/ActionGroup.Autorest/generated/cmdlets/TestAzActionGroup_CreateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class TestAzActionGroup_CreateViaJsonString : global::System.Mana /// 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; - /// Backing field for property. private string _actionGroupName; @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Cmdlets.TestAzActi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ public TestAzActionGroup_CreateViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.ITestNotificationDetailsResponse 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; - } - } + WriteObject(result, false); } } } diff --git a/generated/Monitor/ActionGroup.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/Monitor/ActionGroup.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index ddfbd85214f7..e7df1778e4d6 100644 --- a/generated/Monitor/ActionGroup.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/Monitor/ActionGroup.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -218,13 +218,12 @@ public string GetProcessCustomAttributesAtRuntime() private string GetLoginVerification() { - if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + 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}{Indent}throw ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" {Indent}{Indent}}} "; } diff --git a/generated/Monitor/ActionGroup.Autorest/generated/runtime/Context.cs b/generated/Monitor/ActionGroup.Autorest/generated/runtime/Context.cs index 4ad4b0ef09c7..407e5205d481 100644 --- a/generated/Monitor/ActionGroup.Autorest/generated/runtime/Context.cs +++ b/generated/Monitor/ActionGroup.Autorest/generated/runtime/Context.cs @@ -20,7 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Runtime /// The IContext Interface defines the communication mechanism for input customization. /// /// - /// In the context, we will have client, pipeline, PSBoundParamters, default EventListener, Cancellation. + /// In the context, we will have client, pipeline, PSBoundParameters, default EventListener, Cancellation. /// public interface IContext { diff --git a/generated/Monitor/ActivityLogAlert.Autorest/exports/Get-AzActivityLogAlert.ps1 b/generated/Monitor/ActivityLogAlert.Autorest/exports/Get-AzActivityLogAlert.ps1 index eaf378a45897..1a3db524b02c 100644 --- a/generated/Monitor/ActivityLogAlert.Autorest/exports/Get-AzActivityLogAlert.ps1 +++ b/generated/Monitor/ActivityLogAlert.Autorest/exports/Get-AzActivityLogAlert.ps1 @@ -139,8 +139,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/ActivityLogAlert.Autorest/exports/New-AzActivityLogAlert.ps1 b/generated/Monitor/ActivityLogAlert.Autorest/exports/New-AzActivityLogAlert.ps1 index 289bb75a27b3..7117e0786e30 100644 --- a/generated/Monitor/ActivityLogAlert.Autorest/exports/New-AzActivityLogAlert.ps1 +++ b/generated/Monitor/ActivityLogAlert.Autorest/exports/New-AzActivityLogAlert.ps1 @@ -203,8 +203,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/ActivityLogAlert.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/Monitor/ActivityLogAlert.Autorest/exports/ProxyCmdletDefinitions.ps1 index cccc27603ef3..fcd70f5e849e 100644 --- a/generated/Monitor/ActivityLogAlert.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/Monitor/ActivityLogAlert.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -139,8 +139,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -353,8 +352,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -627,8 +625,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1253,8 +1250,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/ActivityLogAlert.Autorest/exports/Remove-AzActivityLogAlert.ps1 b/generated/Monitor/ActivityLogAlert.Autorest/exports/Remove-AzActivityLogAlert.ps1 index de7b1bc0f9e5..ca6e57739081 100644 --- a/generated/Monitor/ActivityLogAlert.Autorest/exports/Remove-AzActivityLogAlert.ps1 +++ b/generated/Monitor/ActivityLogAlert.Autorest/exports/Remove-AzActivityLogAlert.ps1 @@ -141,8 +141,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/ActivityLogAlert.Autorest/exports/Update-AzActivityLogAlert.ps1 b/generated/Monitor/ActivityLogAlert.Autorest/exports/Update-AzActivityLogAlert.ps1 index a6f0457401c7..ed8228c6ae60 100644 --- a/generated/Monitor/ActivityLogAlert.Autorest/exports/Update-AzActivityLogAlert.ps1 +++ b/generated/Monitor/ActivityLogAlert.Autorest/exports/Update-AzActivityLogAlert.ps1 @@ -171,8 +171,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/ActivityLogAlert.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/Monitor/ActivityLogAlert.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 2ecc57b4d607..17ff50837a26 100644 --- a/generated/Monitor/ActivityLogAlert.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/Monitor/ActivityLogAlert.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -218,13 +218,12 @@ public string GetProcessCustomAttributesAtRuntime() private string GetLoginVerification() { - if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + 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}{Indent}throw ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" {Indent}{Indent}}} "; } diff --git a/generated/Monitor/Autoscale.Autorest/exports/Get-AzAutoscalePredictiveMetric.ps1 b/generated/Monitor/Autoscale.Autorest/exports/Get-AzAutoscalePredictiveMetric.ps1 index d1651977b103..e0ea31aaf6bc 100644 --- a/generated/Monitor/Autoscale.Autorest/exports/Get-AzAutoscalePredictiveMetric.ps1 +++ b/generated/Monitor/Autoscale.Autorest/exports/Get-AzAutoscalePredictiveMetric.ps1 @@ -165,8 +165,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/Autoscale.Autorest/exports/Get-AzAutoscaleSetting.ps1 b/generated/Monitor/Autoscale.Autorest/exports/Get-AzAutoscaleSetting.ps1 index 984d33f5063a..7d21538f5455 100644 --- a/generated/Monitor/Autoscale.Autorest/exports/Get-AzAutoscaleSetting.ps1 +++ b/generated/Monitor/Autoscale.Autorest/exports/Get-AzAutoscaleSetting.ps1 @@ -139,8 +139,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/Autoscale.Autorest/exports/New-AzAutoscaleSetting.ps1 b/generated/Monitor/Autoscale.Autorest/exports/New-AzAutoscaleSetting.ps1 index bcd67535f487..f5d377826655 100644 --- a/generated/Monitor/Autoscale.Autorest/exports/New-AzAutoscaleSetting.ps1 +++ b/generated/Monitor/Autoscale.Autorest/exports/New-AzAutoscaleSetting.ps1 @@ -249,8 +249,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/Autoscale.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/Monitor/Autoscale.Autorest/exports/ProxyCmdletDefinitions.ps1 index f6b987f50b94..24c529ad1657 100644 --- a/generated/Monitor/Autoscale.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/Monitor/Autoscale.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -165,8 +165,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -375,8 +374,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -697,8 +695,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -907,8 +904,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2059,8 +2055,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/Autoscale.Autorest/exports/Remove-AzAutoscaleSetting.ps1 b/generated/Monitor/Autoscale.Autorest/exports/Remove-AzAutoscaleSetting.ps1 index 9905f5bd8f38..04889cc6fe42 100644 --- a/generated/Monitor/Autoscale.Autorest/exports/Remove-AzAutoscaleSetting.ps1 +++ b/generated/Monitor/Autoscale.Autorest/exports/Remove-AzAutoscaleSetting.ps1 @@ -138,8 +138,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/Autoscale.Autorest/exports/Update-AzAutoscaleSetting.ps1 b/generated/Monitor/Autoscale.Autorest/exports/Update-AzAutoscaleSetting.ps1 index ae9ddbcae8e7..c4321239a4d4 100644 --- a/generated/Monitor/Autoscale.Autorest/exports/Update-AzAutoscaleSetting.ps1 +++ b/generated/Monitor/Autoscale.Autorest/exports/Update-AzAutoscaleSetting.ps1 @@ -235,8 +235,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/Autoscale.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/Monitor/Autoscale.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 7b7f12f17799..0fe2eb91213a 100644 --- a/generated/Monitor/Autoscale.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/Monitor/Autoscale.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -218,13 +218,12 @@ public string GetProcessCustomAttributesAtRuntime() private string GetLoginVerification() { - if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + 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}{Indent}throw ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" {Indent}{Indent}}} "; } diff --git a/generated/Monitor/DataCollectionRule.Autorest/exports/Get-AzDataCollectionEndpoint.ps1 b/generated/Monitor/DataCollectionRule.Autorest/exports/Get-AzDataCollectionEndpoint.ps1 index e30eb76b14b2..003740ca7795 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/exports/Get-AzDataCollectionEndpoint.ps1 +++ b/generated/Monitor/DataCollectionRule.Autorest/exports/Get-AzDataCollectionEndpoint.ps1 @@ -143,8 +143,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DataCollectionRule.Autorest/exports/Get-AzDataCollectionRule.ps1 b/generated/Monitor/DataCollectionRule.Autorest/exports/Get-AzDataCollectionRule.ps1 index 9c8882b99c95..c0c7d4257b8a 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/exports/Get-AzDataCollectionRule.ps1 +++ b/generated/Monitor/DataCollectionRule.Autorest/exports/Get-AzDataCollectionRule.ps1 @@ -143,8 +143,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DataCollectionRule.Autorest/exports/Get-AzDataCollectionRuleAssociation.ps1 b/generated/Monitor/DataCollectionRule.Autorest/exports/Get-AzDataCollectionRuleAssociation.ps1 index 38648bc009ab..0cbbe8b13a54 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/exports/Get-AzDataCollectionRuleAssociation.ps1 +++ b/generated/Monitor/DataCollectionRule.Autorest/exports/Get-AzDataCollectionRuleAssociation.ps1 @@ -168,8 +168,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DataCollectionRule.Autorest/exports/New-AzDataCollectionEndpoint.ps1 b/generated/Monitor/DataCollectionRule.Autorest/exports/New-AzDataCollectionEndpoint.ps1 index 455e779fcbcb..6b1c5a5ab2a1 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/exports/New-AzDataCollectionEndpoint.ps1 +++ b/generated/Monitor/DataCollectionRule.Autorest/exports/New-AzDataCollectionEndpoint.ps1 @@ -192,8 +192,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DataCollectionRule.Autorest/exports/New-AzDataCollectionRule.ps1 b/generated/Monitor/DataCollectionRule.Autorest/exports/New-AzDataCollectionRule.ps1 index 92011717e3da..f47d4954f495 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/exports/New-AzDataCollectionRule.ps1 +++ b/generated/Monitor/DataCollectionRule.Autorest/exports/New-AzDataCollectionRule.ps1 @@ -482,8 +482,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DataCollectionRule.Autorest/exports/New-AzDataCollectionRuleAssociation.ps1 b/generated/Monitor/DataCollectionRule.Autorest/exports/New-AzDataCollectionRuleAssociation.ps1 index 03b25f5e6da0..3d62499e20d4 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/exports/New-AzDataCollectionRuleAssociation.ps1 +++ b/generated/Monitor/DataCollectionRule.Autorest/exports/New-AzDataCollectionRuleAssociation.ps1 @@ -141,8 +141,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DataCollectionRule.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/Monitor/DataCollectionRule.Autorest/exports/ProxyCmdletDefinitions.ps1 index 6d17206086d5..d86a0291bc90 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/Monitor/DataCollectionRule.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -143,8 +143,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -384,8 +383,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -601,8 +599,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -866,8 +863,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1079,8 +1075,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1626,8 +1621,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1840,8 +1834,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2046,8 +2039,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2252,8 +2244,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2507,8 +2498,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2728,8 +2718,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -3210,8 +3199,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DataCollectionRule.Autorest/exports/Remove-AzDataCollectionEndpoint.ps1 b/generated/Monitor/DataCollectionRule.Autorest/exports/Remove-AzDataCollectionEndpoint.ps1 index 6243b7e1bd6e..975de42a631c 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/exports/Remove-AzDataCollectionEndpoint.ps1 +++ b/generated/Monitor/DataCollectionRule.Autorest/exports/Remove-AzDataCollectionEndpoint.ps1 @@ -142,8 +142,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DataCollectionRule.Autorest/exports/Remove-AzDataCollectionRule.ps1 b/generated/Monitor/DataCollectionRule.Autorest/exports/Remove-AzDataCollectionRule.ps1 index 7c0a847564ea..186d64c644d7 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/exports/Remove-AzDataCollectionRule.ps1 +++ b/generated/Monitor/DataCollectionRule.Autorest/exports/Remove-AzDataCollectionRule.ps1 @@ -142,8 +142,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DataCollectionRule.Autorest/exports/Remove-AzDataCollectionRuleAssociation.ps1 b/generated/Monitor/DataCollectionRule.Autorest/exports/Remove-AzDataCollectionRuleAssociation.ps1 index 0fe9812c2f9c..9fa2834d32d0 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/exports/Remove-AzDataCollectionRuleAssociation.ps1 +++ b/generated/Monitor/DataCollectionRule.Autorest/exports/Remove-AzDataCollectionRuleAssociation.ps1 @@ -135,8 +135,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DataCollectionRule.Autorest/exports/Update-AzDataCollectionEndpoint.ps1 b/generated/Monitor/DataCollectionRule.Autorest/exports/Update-AzDataCollectionEndpoint.ps1 index 87460f0a1277..81586bff698f 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/exports/Update-AzDataCollectionEndpoint.ps1 +++ b/generated/Monitor/DataCollectionRule.Autorest/exports/Update-AzDataCollectionEndpoint.ps1 @@ -184,8 +184,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DataCollectionRule.Autorest/exports/Update-AzDataCollectionRule.ps1 b/generated/Monitor/DataCollectionRule.Autorest/exports/Update-AzDataCollectionRule.ps1 index 2a0700ba214d..b2714163223d 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/exports/Update-AzDataCollectionRule.ps1 +++ b/generated/Monitor/DataCollectionRule.Autorest/exports/Update-AzDataCollectionRule.ps1 @@ -418,8 +418,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DataCollectionRule.Autorest/exports/Update-AzDataCollectionRuleAssociation.ps1 b/generated/Monitor/DataCollectionRule.Autorest/exports/Update-AzDataCollectionRuleAssociation.ps1 index 4bb18e001cbf..00345b91172c 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/exports/Update-AzDataCollectionRuleAssociation.ps1 +++ b/generated/Monitor/DataCollectionRule.Autorest/exports/Update-AzDataCollectionRuleAssociation.ps1 @@ -150,8 +150,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DataCollectionRule.Autorest/generated/Module.cs b/generated/Monitor/DataCollectionRule.Autorest/generated/Module.cs index d6a515e71231..826e3f0e6720 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/generated/Module.cs +++ b/generated/Monitor/DataCollectionRule.Autorest/generated/Module.cs @@ -68,7 +68,7 @@ public partial class Module public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Module Instance { get { if (_instance == null) { lock (_singletonLock) { if (_instance == null) { _instance = new Module(); }}} return _instance; } } /// The Name of this module - public string Name => @"Az.DataCollectionRule"; + public string Name => @"Az.Monitor"; /// The delegate to call when this module is loaded (supporting a commmon module). public ModuleLoadPipelineDelegate OnModuleLoad { get; set; } @@ -80,7 +80,7 @@ public partial class Module public global::System.String ProfileName { get; set; } /// The ResourceID for this module (azure arm). - public string ResourceId => @"Az.DataCollectionRule"; + public string ResourceId => @"Az.Monitor"; /// The delegate to call in WriteObject to sanitize the output object. public SanitizerDelegate SanitizeOutput { get; set; } diff --git a/generated/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionEndpoint_Delete.cs b/generated/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionEndpoint_Delete.cs index 658257c10a9c..58de4ff0b9eb 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionEndpoint_Delete.cs +++ b/generated/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionEndpoint_Delete.cs @@ -495,7 +495,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 +519,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/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionEndpoint_DeleteViaIdentity.cs b/generated/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionEndpoint_DeleteViaIdentity.cs index 300c025b006c..aa8e3b14f32c 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionEndpoint_DeleteViaIdentity.cs +++ b/generated/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionEndpoint_DeleteViaIdentity.cs @@ -475,7 +475,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 +499,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/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionRuleAssociation_Delete.cs b/generated/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionRuleAssociation_Delete.cs index 6f1e4e14dba6..378a63b17b0d 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionRuleAssociation_Delete.cs +++ b/generated/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionRuleAssociation_Delete.cs @@ -477,7 +477,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -501,7 +501,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/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionRuleAssociation_DeleteViaIdentity.cs b/generated/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionRuleAssociation_DeleteViaIdentity.cs index c025af216896..33139c2d3cb9 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionRuleAssociation_DeleteViaIdentity.cs +++ b/generated/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionRuleAssociation_DeleteViaIdentity.cs @@ -471,7 +471,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -495,7 +495,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/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionRule_Delete.cs b/generated/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionRule_Delete.cs index ae2d91ebb8c6..e23eaa255e86 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionRule_Delete.cs +++ b/generated/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionRule_Delete.cs @@ -495,7 +495,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 +519,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/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionRule_DeleteViaIdentity.cs b/generated/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionRule_DeleteViaIdentity.cs index a6340bbdf74c..7fa836e60b46 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionRule_DeleteViaIdentity.cs +++ b/generated/Monitor/DataCollectionRule.Autorest/generated/cmdlets/RemoveAzDataCollectionRule_DeleteViaIdentity.cs @@ -475,7 +475,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 +499,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/Monitor/DataCollectionRule.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/Monitor/DataCollectionRule.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 188fe1d33c98..5af3fcf0cd8e 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/Monitor/DataCollectionRule.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -218,13 +218,12 @@ public string GetProcessCustomAttributesAtRuntime() private string GetLoginVerification() { - if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + 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}{Indent}throw ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" {Indent}{Indent}}} "; } diff --git a/generated/Monitor/DataCollectionRule.Autorest/generated/runtime/Context.cs b/generated/Monitor/DataCollectionRule.Autorest/generated/runtime/Context.cs index a4f5f45eadd3..4098fd1a9ddb 100644 --- a/generated/Monitor/DataCollectionRule.Autorest/generated/runtime/Context.cs +++ b/generated/Monitor/DataCollectionRule.Autorest/generated/runtime/Context.cs @@ -20,7 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Runtime /// The IContext Interface defines the communication mechanism for input customization. /// /// - /// In the context, we will have client, pipeline, PSBoundParamters, default EventListener, Cancellation. + /// In the context, we will have client, pipeline, PSBoundParameters, default EventListener, Cancellation. /// public interface IContext { diff --git a/generated/Monitor/DiagnosticSetting.Autorest/Properties/AssemblyInfo.cs b/generated/Monitor/DiagnosticSetting.Autorest/Properties/AssemblyInfo.cs index fe75862408b6..ea1dd81fa6a1 100644 --- a/generated/Monitor/DiagnosticSetting.Autorest/Properties/AssemblyInfo.cs +++ b/generated/Monitor/DiagnosticSetting.Autorest/Properties/AssemblyInfo.cs @@ -23,4 +23,4 @@ [assembly: System.Reflection.AssemblyFileVersionAttribute("6.0.2")] [assembly: System.Reflection.AssemblyVersionAttribute("6.0.2")] [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] -[assembly: System.CLSCompliantAttribute(false)] \ No newline at end of file +[assembly: System.CLSCompliantAttribute(false)] diff --git a/generated/Monitor/DiagnosticSetting.Autorest/exports/Get-AzDiagnosticSetting.ps1 b/generated/Monitor/DiagnosticSetting.Autorest/exports/Get-AzDiagnosticSetting.ps1 index 894a1b3e8379..1b66ee36dd7e 100644 --- a/generated/Monitor/DiagnosticSetting.Autorest/exports/Get-AzDiagnosticSetting.ps1 +++ b/generated/Monitor/DiagnosticSetting.Autorest/exports/Get-AzDiagnosticSetting.ps1 @@ -128,8 +128,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DiagnosticSetting.Autorest/exports/Get-AzDiagnosticSettingCategory.ps1 b/generated/Monitor/DiagnosticSetting.Autorest/exports/Get-AzDiagnosticSettingCategory.ps1 index 20c1b040c7af..415d0a395337 100644 --- a/generated/Monitor/DiagnosticSetting.Autorest/exports/Get-AzDiagnosticSettingCategory.ps1 +++ b/generated/Monitor/DiagnosticSetting.Autorest/exports/Get-AzDiagnosticSettingCategory.ps1 @@ -125,8 +125,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DiagnosticSetting.Autorest/exports/Get-AzEventCategory.ps1 b/generated/Monitor/DiagnosticSetting.Autorest/exports/Get-AzEventCategory.ps1 index bbf2f21534b8..22dc26f298eb 100644 --- a/generated/Monitor/DiagnosticSetting.Autorest/exports/Get-AzEventCategory.ps1 +++ b/generated/Monitor/DiagnosticSetting.Autorest/exports/Get-AzEventCategory.ps1 @@ -95,8 +95,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DiagnosticSetting.Autorest/exports/Get-AzSubscriptionDiagnosticSetting.ps1 b/generated/Monitor/DiagnosticSetting.Autorest/exports/Get-AzSubscriptionDiagnosticSetting.ps1 index 0b1f917cebea..c6bb815f3171 100644 --- a/generated/Monitor/DiagnosticSetting.Autorest/exports/Get-AzSubscriptionDiagnosticSetting.ps1 +++ b/generated/Monitor/DiagnosticSetting.Autorest/exports/Get-AzSubscriptionDiagnosticSetting.ps1 @@ -127,8 +127,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DiagnosticSetting.Autorest/exports/New-AzDiagnosticSetting.ps1 b/generated/Monitor/DiagnosticSetting.Autorest/exports/New-AzDiagnosticSetting.ps1 index ff59d3db481a..d501020ca7a0 100644 --- a/generated/Monitor/DiagnosticSetting.Autorest/exports/New-AzDiagnosticSetting.ps1 +++ b/generated/Monitor/DiagnosticSetting.Autorest/exports/New-AzDiagnosticSetting.ps1 @@ -208,8 +208,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DiagnosticSetting.Autorest/exports/New-AzSubscriptionDiagnosticSetting.ps1 b/generated/Monitor/DiagnosticSetting.Autorest/exports/New-AzSubscriptionDiagnosticSetting.ps1 index 51e423926b73..c3753e1cbb40 100644 --- a/generated/Monitor/DiagnosticSetting.Autorest/exports/New-AzSubscriptionDiagnosticSetting.ps1 +++ b/generated/Monitor/DiagnosticSetting.Autorest/exports/New-AzSubscriptionDiagnosticSetting.ps1 @@ -176,8 +176,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DiagnosticSetting.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/Monitor/DiagnosticSetting.Autorest/exports/ProxyCmdletDefinitions.ps1 index 8bca398ab92f..1bc17a9240e3 100644 --- a/generated/Monitor/DiagnosticSetting.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/Monitor/DiagnosticSetting.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -125,8 +125,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -318,8 +317,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -478,8 +476,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -668,8 +665,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -948,8 +944,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1189,8 +1184,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1391,8 +1385,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1585,8 +1578,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1856,8 +1848,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2096,8 +2087,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DiagnosticSetting.Autorest/exports/Remove-AzDiagnosticSetting.ps1 b/generated/Monitor/DiagnosticSetting.Autorest/exports/Remove-AzDiagnosticSetting.ps1 index d1fb99a116bb..50bed1adfb5a 100644 --- a/generated/Monitor/DiagnosticSetting.Autorest/exports/Remove-AzDiagnosticSetting.ps1 +++ b/generated/Monitor/DiagnosticSetting.Autorest/exports/Remove-AzDiagnosticSetting.ps1 @@ -130,8 +130,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DiagnosticSetting.Autorest/exports/Remove-AzSubscriptionDiagnosticSetting.ps1 b/generated/Monitor/DiagnosticSetting.Autorest/exports/Remove-AzSubscriptionDiagnosticSetting.ps1 index d8c6dc3ab622..2f8ab90e390f 100644 --- a/generated/Monitor/DiagnosticSetting.Autorest/exports/Remove-AzSubscriptionDiagnosticSetting.ps1 +++ b/generated/Monitor/DiagnosticSetting.Autorest/exports/Remove-AzSubscriptionDiagnosticSetting.ps1 @@ -130,8 +130,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DiagnosticSetting.Autorest/exports/Update-AzDiagnosticSetting.ps1 b/generated/Monitor/DiagnosticSetting.Autorest/exports/Update-AzDiagnosticSetting.ps1 index b228034e193a..db4dc7e0c45a 100644 --- a/generated/Monitor/DiagnosticSetting.Autorest/exports/Update-AzDiagnosticSetting.ps1 +++ b/generated/Monitor/DiagnosticSetting.Autorest/exports/Update-AzDiagnosticSetting.ps1 @@ -200,8 +200,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DiagnosticSetting.Autorest/exports/Update-AzSubscriptionDiagnosticSetting.ps1 b/generated/Monitor/DiagnosticSetting.Autorest/exports/Update-AzSubscriptionDiagnosticSetting.ps1 index d1ef3665f3bc..da8b1e5a1591 100644 --- a/generated/Monitor/DiagnosticSetting.Autorest/exports/Update-AzSubscriptionDiagnosticSetting.ps1 +++ b/generated/Monitor/DiagnosticSetting.Autorest/exports/Update-AzSubscriptionDiagnosticSetting.ps1 @@ -176,8 +176,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/DiagnosticSetting.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/Monitor/DiagnosticSetting.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 426eab1372bc..52783ccdff79 100644 --- a/generated/Monitor/DiagnosticSetting.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/Monitor/DiagnosticSetting.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -218,13 +218,12 @@ public string GetProcessCustomAttributesAtRuntime() private string GetLoginVerification() { - if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + 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}{Indent}throw ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" {Indent}{Indent}}} "; } diff --git a/generated/Monitor/Metricdata.Autorest/Properties/AssemblyInfo.cs b/generated/Monitor/Metricdata.Autorest/Properties/AssemblyInfo.cs index d3991ca7839a..2e1ec8d7606e 100644 --- a/generated/Monitor/Metricdata.Autorest/Properties/AssemblyInfo.cs +++ b/generated/Monitor/Metricdata.Autorest/Properties/AssemblyInfo.cs @@ -20,7 +20,7 @@ [assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")] [assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")] [assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Metricdata")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("6.0.2")] -[assembly: System.Reflection.AssemblyVersionAttribute("6.0.2")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.0.0")] +[assembly: System.Reflection.AssemblyVersionAttribute("0.1.0.0")] [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] [assembly: System.CLSCompliantAttribute(false)] diff --git a/generated/Monitor/Metricdata.Autorest/exports/Get-AzMetricsBatch.ps1 b/generated/Monitor/Metricdata.Autorest/exports/Get-AzMetricsBatch.ps1 index 54239c509490..231e2f7b9050 100644 --- a/generated/Monitor/Metricdata.Autorest/exports/Get-AzMetricsBatch.ps1 +++ b/generated/Monitor/Metricdata.Autorest/exports/Get-AzMetricsBatch.ps1 @@ -224,8 +224,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/Metricdata.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/Monitor/Metricdata.Autorest/exports/ProxyCmdletDefinitions.ps1 index 54239c509490..231e2f7b9050 100644 --- a/generated/Monitor/Metricdata.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/Monitor/Metricdata.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -224,8 +224,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/Metricdata.Autorest/generated/Module.cs b/generated/Monitor/Metricdata.Autorest/generated/Module.cs index 7192a377e054..75378f811d6a 100644 --- a/generated/Monitor/Metricdata.Autorest/generated/Module.cs +++ b/generated/Monitor/Metricdata.Autorest/generated/Module.cs @@ -68,7 +68,7 @@ public partial class Module public static Microsoft.Azure.PowerShell.Cmdlets.Metric.Module Instance { get { if (_instance == null) { lock (_singletonLock) { if (_instance == null) { _instance = new Module(); }}} return _instance; } } /// The Name of this module - public string Name => @"Az.Metricdata"; + public string Name => @"Az.Monitor"; /// The delegate to call when this module is loaded (supporting a commmon module). public ModuleLoadPipelineDelegate OnModuleLoad { get; set; } @@ -80,7 +80,7 @@ public partial class Module public global::System.String ProfileName { get; set; } /// The ResourceID for this module (azure arm). - public string ResourceId => @"Az.Metricdata"; + public string ResourceId => @"Az.Monitor"; /// The delegate to call in WriteObject to sanitize the output object. public SanitizerDelegate SanitizeOutput { get; set; } diff --git a/generated/Monitor/Metricdata.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/Monitor/Metricdata.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 6141b372b047..86f123e43bd0 100644 --- a/generated/Monitor/Metricdata.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/Monitor/Metricdata.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -218,13 +218,12 @@ public string GetProcessCustomAttributesAtRuntime() private string GetLoginVerification() { - if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + 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}{Indent}throw ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" {Indent}{Indent}}} "; } diff --git a/generated/Monitor/Metricdata.Autorest/generated/runtime/Context.cs b/generated/Monitor/Metricdata.Autorest/generated/runtime/Context.cs index 0fbaf5c3ad44..bbef033ad647 100644 --- a/generated/Monitor/Metricdata.Autorest/generated/runtime/Context.cs +++ b/generated/Monitor/Metricdata.Autorest/generated/runtime/Context.cs @@ -20,7 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Metric.Runtime /// The IContext Interface defines the communication mechanism for input customization. /// /// - /// In the context, we will have client, pipeline, PSBoundParamters, default EventListener, Cancellation. + /// In the context, we will have client, pipeline, PSBoundParameters, default EventListener, Cancellation. /// public interface IContext { diff --git a/generated/Monitor/MonitorWorkspace.Autorest/Az.MonitorWorkspace.format.ps1xml b/generated/Monitor/MonitorWorkspace.Autorest/Az.MonitorWorkspace.format.ps1xml index 2c34e4da0215..26066104f189 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/Az.MonitorWorkspace.format.ps1xml +++ b/generated/Monitor/MonitorWorkspace.Autorest/Az.MonitorWorkspace.format.ps1xml @@ -2,33 +2,33 @@ - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.MonitorWorkspaceIdentity + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspace - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.MonitorWorkspaceIdentity + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspace#Multiple - + - + - + - AzureMonitorWorkspaceName + AccountId - ResourceGroupName + ProvisioningState - SubscriptionId + PublicNetworkAccess @@ -36,32 +36,82 @@ - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointConnection + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceDefaultIngestionSettings - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointConnection + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceDefaultIngestionSettings#Multiple - + - + + + + + + + DataCollectionEndpointResourceId + + + DataCollectionRuleResourceId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceMetrics + + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceMetrics#Multiple + + + - + - + + + + + + + InternalId + + + PrometheusQueryEndpoint + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResource + + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResource#Multiple + + + - + - + - + + + + + + + @@ -71,22 +121,16 @@ Name - SystemDataCreatedAt - - - SystemDataCreatedBy - - - SystemDataCreatedByType + Location - SystemDataLastModifiedAt + ProvisioningState - SystemDataLastModifiedBy + PublicNetworkAccess - SystemDataLastModifiedByType + ResourceGroupName @@ -94,27 +138,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointConnectionProperties + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceForUpdateTags - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointConnectionProperties + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceForUpdateTags#Multiple - - - - + - GroupId - - - ProvisioningState + Item @@ -122,33 +160,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateLinkServiceConnectionState + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceListResult - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateLinkServiceConnectionState + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceListResult#Multiple - - - - - - - + - ActionsRequired - - - Description - - - Status + NextLink @@ -156,21 +182,57 @@ - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.Resource + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceProperties - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.Resource + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceProperties#Multiple - + + + + + + + + + + + + + + + + + + + - Name + AccountId + + + DefaultIngestionSettingDataCollectionEndpointResourceId + + + DefaultIngestionSettingDataCollectionRuleResourceId + + + MetricInternalId + + + MetricPrometheusQueryEndpoint + + + ProvisioningState + + + PublicNetworkAccess @@ -178,9 +240,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorDetail - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorDetail#Multiple @@ -212,39 +274,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.Operation + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IngestionSettings - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.Operation + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IngestionSettings#Multiple - - - - - - - + - + - ActionType - - - IsDataAction - - - Name + DataCollectionEndpointResourceId - Origin + DataCollectionRuleResourceId @@ -252,39 +302,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.OperationDisplay + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Metrics - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.OperationDisplay + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Metrics#Multiple - - - - - - - + - + - Description - - - Operation - - - Provider + InternalId - Resource + PrometheusQueryEndpoint @@ -292,21 +330,33 @@ - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.OperationListResult + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.MonitorWorkspaceIdentity - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.OperationListResult + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.MonitorWorkspaceIdentity#Multiple - + + + + + + + - NextLink + AzureMonitorWorkspaceName + + + ResourceGroupName + + + SubscriptionId @@ -314,73 +364,101 @@ - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ResourceAutoGenerated + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Operation - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ResourceAutoGenerated + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Operation#Multiple + + + + + + + + + + + ActionType + + + IsDataAction + Name + + Origin + - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.SystemData + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.OperationDisplay - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.SystemData + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.OperationDisplay#Multiple - - - - - - - + - + - + - + - CreatedAt - - - CreatedBy + Description - CreatedByType + Operation - LastModifiedAt + Provider - LastModifiedBy + Resource + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.OperationListResult + + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.OperationListResult#Multiple + + + + + + + + + + - LastModifiedByType + NextLink @@ -388,9 +466,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.TrackedResource + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointConnection - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.TrackedResource + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointConnection#Multiple @@ -415,9 +493,6 @@ - - - @@ -443,30 +518,27 @@ SystemDataLastModifiedByType - - Location - - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.TrackedResourceTags + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointConnectionProperties - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.TrackedResourceTags + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointConnectionProperties#Multiple - + - Item + ProvisioningState @@ -474,33 +546,33 @@ - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspace + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateLinkServiceConnectionState - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspace + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateLinkServiceConnectionState#Multiple - + - + - + - AccountId + ActionsRequired - ProvisioningState + Description - PublicNetworkAccess + Status @@ -508,27 +580,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceDefaultIngestionSettings + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Resource - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceDefaultIngestionSettings + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Resource#Multiple - - - - + - DataCollectionEndpointResourceId - - - DataCollectionRuleResourceId + Name @@ -536,27 +602,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceMetrics + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ResourceAutoGenerated - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceMetrics + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ResourceAutoGenerated#Multiple - - - - + - InternalId - - - PrometheusQueryEndpoint + Name @@ -564,67 +624,51 @@ - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResource + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.SystemData - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResource + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.SystemData#Multiple - + - + - + - + - + + + + - Name + CreatedAt - Location + CreatedBy - ProvisioningState + CreatedByType - PublicNetworkAccess + LastModifiedAt - ResourceGroupName + LastModifiedBy - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResourceForUpdateTags - - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResourceForUpdateTags - - - - - - - - - - - Item + LastModifiedByType @@ -632,107 +676,63 @@ - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResourceListResult + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.TrackedResource - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResourceListResult + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.TrackedResource#Multiple - + - - - - - - NextLink - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResourceProperties - - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResourceProperties - - - - + - + - + - + - + - + - + - AccountId - - - DefaultIngestionSettingDataCollectionEndpointResourceId + Name - DefaultIngestionSettingDataCollectionRuleResourceId + SystemDataCreatedAt - MetricInternalId + SystemDataCreatedBy - MetricPrometheusQueryEndpoint + SystemDataCreatedByType - ProvisioningState + SystemDataLastModifiedAt - PublicNetworkAccess + SystemDataLastModifiedBy - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IngestionSettings - - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IngestionSettings - - - - - - - - - - - - - - DataCollectionEndpointResourceId + SystemDataLastModifiedByType - DataCollectionRuleResourceId + Location @@ -740,27 +740,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.Metrics + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.TrackedResourceTags - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.Metrics + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.TrackedResourceTags#Multiple - - - - + - InternalId - - - PrometheusQueryEndpoint + Item diff --git a/generated/Monitor/MonitorWorkspace.Autorest/Az.MonitorWorkspace.psd1 b/generated/Monitor/MonitorWorkspace.Autorest/Az.MonitorWorkspace.psd1 index 5b5a9413621a..e2782fd57fc2 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/Az.MonitorWorkspace.psd1 +++ b/generated/Monitor/MonitorWorkspace.Autorest/Az.MonitorWorkspace.psd1 @@ -11,8 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.MonitorWorkspace.private.dll' FormatsToProcess = './Az.MonitorWorkspace.format.ps1xml' - FunctionsToExport = 'Get-AzMonitorWorkspace', 'New-AzMonitorWorkspace', 'Remove-AzMonitorWorkspace', 'Update-AzMonitorWorkspace', '*' - AliasesToExport = '*' + FunctionsToExport = 'Get-AzMonitorWorkspace', 'New-AzMonitorWorkspace', 'Remove-AzMonitorWorkspace', 'Update-AzMonitorWorkspace' PrivateData = @{ PSData = @{ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'MonitorWorkspace' diff --git a/generated/Monitor/MonitorWorkspace.Autorest/check-dependencies.ps1 b/generated/Monitor/MonitorWorkspace.Autorest/check-dependencies.ps1 index c29591c7bfe1..90ca9867ae40 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/check-dependencies.ps1 +++ b/generated/Monitor/MonitorWorkspace.Autorest/check-dependencies.ps1 @@ -12,13 +12,13 @@ # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- -param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources) +param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources) $ErrorActionPreference = 'Stop' -if(-not $Isolated) { +if(-not $NotIsolated) { Write-Host -ForegroundColor Green 'Creating isolated process...' $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path - & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated return } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/exports/Get-AzMonitorWorkspace.ps1 b/generated/Monitor/MonitorWorkspace.Autorest/exports/Get-AzMonitorWorkspace.ps1 index 36da837e3dd3..f666f02289d2 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/exports/Get-AzMonitorWorkspace.ps1 +++ b/generated/Monitor/MonitorWorkspace.Autorest/exports/Get-AzMonitorWorkspace.ps1 @@ -29,7 +29,7 @@ Get-AzMonitorWorkspace -ResourceGroupName azps_test_group -Name azps-monitor-wor .Inputs Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMonitorWorkspaceIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource +Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource .Notes COMPLEX PARAMETER PROPERTIES @@ -44,7 +44,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.monitor/get-azmonitorworkspace #> function Get-AzMonitorWorkspace { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource])] [CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -76,7 +76,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMonitorWorkspaceIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -135,6 +134,14 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -159,9 +166,7 @@ begin { List = 'Az.MonitorWorkspace.private\Get-AzMonitorWorkspace_List'; List1 = 'Az.MonitorWorkspace.private\Get-AzMonitorWorkspace_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.Monitor.MonitorWorkspace.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -175,6 +180,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/Monitor/MonitorWorkspace.Autorest/exports/New-AzMonitorWorkspace.ps1 b/generated/Monitor/MonitorWorkspace.Autorest/exports/New-AzMonitorWorkspace.ps1 index e0edb1cd10a2..57e7719a477a 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/exports/New-AzMonitorWorkspace.ps1 +++ b/generated/Monitor/MonitorWorkspace.Autorest/exports/New-AzMonitorWorkspace.ps1 @@ -16,16 +16,16 @@ <# .Synopsis -Create or update a workspace +Create a workspace .Description -Create or update a workspace +Create a workspace .Example New-AzMonitorWorkspace -Name azps-monitor-workspace -ResourceGroupName azps_test_group -Location eastus .Inputs Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMonitorWorkspaceIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource +Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource .Notes COMPLEX PARAMETER PROPERTIES @@ -40,10 +40,12 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.monitor/new-azmonitorworkspace #> function New-AzMonitorWorkspace { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('AzureMonitorWorkspaceName')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [System.String] @@ -52,6 +54,8 @@ param( ${Name}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [System.String] # The name of the resource group. @@ -59,6 +63,8 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaJsonFilePath')] + [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -69,22 +75,35 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMonitorWorkspaceIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -141,6 +160,14 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -162,10 +189,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.MonitorWorkspace.private\New-AzMonitorWorkspace_CreateExpanded'; CreateViaIdentityExpanded = 'Az.MonitorWorkspace.private\New-AzMonitorWorkspace_CreateViaIdentityExpanded'; + CreateViaJsonFilePath = 'Az.MonitorWorkspace.private\New-AzMonitorWorkspace_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.MonitorWorkspace.private\New-AzMonitorWorkspace_CreateViaJsonString'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -179,6 +206,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/Monitor/MonitorWorkspace.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/Monitor/MonitorWorkspace.Autorest/exports/ProxyCmdletDefinitions.ps1 index d3f259acdb9d..56ae860591cf 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/Monitor/MonitorWorkspace.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -29,7 +29,7 @@ Get-AzMonitorWorkspace -ResourceGroupName azps_test_group -Name azps-monitor-wor .Inputs Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMonitorWorkspaceIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource +Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource .Notes COMPLEX PARAMETER PROPERTIES @@ -44,7 +44,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.monitor/get-azmonitorworkspace #> function Get-AzMonitorWorkspace { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource])] [CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -76,7 +76,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMonitorWorkspaceIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -135,6 +134,14 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -159,9 +166,7 @@ begin { List = 'Az.MonitorWorkspace.private\Get-AzMonitorWorkspace_List'; List1 = 'Az.MonitorWorkspace.private\Get-AzMonitorWorkspace_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.Monitor.MonitorWorkspace.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -175,6 +180,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) @@ -220,16 +228,16 @@ end { <# .Synopsis -Create or update a workspace +Create a workspace .Description -Create or update a workspace +Create a workspace .Example New-AzMonitorWorkspace -Name azps-monitor-workspace -ResourceGroupName azps_test_group -Location eastus .Inputs Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMonitorWorkspaceIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource +Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource .Notes COMPLEX PARAMETER PROPERTIES @@ -244,10 +252,12 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.monitor/new-azmonitorworkspace #> function New-AzMonitorWorkspace { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('AzureMonitorWorkspaceName')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [System.String] @@ -256,6 +266,8 @@ param( ${Name}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [System.String] # The name of the resource group. @@ -263,6 +275,8 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaJsonFilePath')] + [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -273,22 +287,35 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMonitorWorkspaceIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -345,6 +372,14 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -366,10 +401,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.MonitorWorkspace.private\New-AzMonitorWorkspace_CreateExpanded'; CreateViaIdentityExpanded = 'Az.MonitorWorkspace.private\New-AzMonitorWorkspace_CreateViaIdentityExpanded'; + CreateViaJsonFilePath = 'Az.MonitorWorkspace.private\New-AzMonitorWorkspace_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.MonitorWorkspace.private\New-AzMonitorWorkspace_CreateViaJsonString'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -383,6 +418,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) @@ -483,7 +521,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMonitorWorkspaceIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -560,6 +597,14 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -582,9 +627,7 @@ begin { Delete = 'Az.MonitorWorkspace.private\Remove-AzMonitorWorkspace_Delete'; DeleteViaIdentity = 'Az.MonitorWorkspace.private\Remove-AzMonitorWorkspace_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -598,6 +641,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) @@ -643,9 +689,9 @@ end { <# .Synopsis -Updates part of a workspace +Update part of a workspace .Description -Updates part of a workspace +Update part of a workspace .Example Update-AzMonitorWorkspace -Name azps-monitor-workspace -ResourceGroupName azps_test_group -Tag @{"123"="abc"} .Example @@ -654,7 +700,7 @@ Get-AzMonitorWorkspace -Name azps-monitor-workspace -ResourceGroupName azps_test .Inputs Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMonitorWorkspaceIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource +Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource .Notes COMPLEX PARAMETER PROPERTIES @@ -669,10 +715,12 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.monitor/update-azmonitorworkspace #> function Update-AzMonitorWorkspace { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('AzureMonitorWorkspaceName')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [System.String] @@ -681,6 +729,8 @@ param( ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [System.String] # The name of the resource group. @@ -688,6 +738,8 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -698,16 +750,28 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMonitorWorkspaceIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -764,6 +828,14 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -785,10 +857,10 @@ begin { $mapping = @{ UpdateExpanded = 'Az.MonitorWorkspace.private\Update-AzMonitorWorkspace_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.MonitorWorkspace.private\Update-AzMonitorWorkspace_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.MonitorWorkspace.private\Update-AzMonitorWorkspace_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.MonitorWorkspace.private\Update-AzMonitorWorkspace_UpdateViaJsonString'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -802,6 +874,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/Monitor/MonitorWorkspace.Autorest/exports/Remove-AzMonitorWorkspace.ps1 b/generated/Monitor/MonitorWorkspace.Autorest/exports/Remove-AzMonitorWorkspace.ps1 index 8bdd5ecd289d..e714e05cec2f 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/exports/Remove-AzMonitorWorkspace.ps1 +++ b/generated/Monitor/MonitorWorkspace.Autorest/exports/Remove-AzMonitorWorkspace.ps1 @@ -71,7 +71,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMonitorWorkspaceIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -148,6 +147,14 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -170,9 +177,7 @@ begin { Delete = 'Az.MonitorWorkspace.private\Remove-AzMonitorWorkspace_Delete'; DeleteViaIdentity = 'Az.MonitorWorkspace.private\Remove-AzMonitorWorkspace_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -186,6 +191,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/Monitor/MonitorWorkspace.Autorest/exports/Update-AzMonitorWorkspace.ps1 b/generated/Monitor/MonitorWorkspace.Autorest/exports/Update-AzMonitorWorkspace.ps1 index 82451dec4043..56479e9cdee5 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/exports/Update-AzMonitorWorkspace.ps1 +++ b/generated/Monitor/MonitorWorkspace.Autorest/exports/Update-AzMonitorWorkspace.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Updates part of a workspace +Update part of a workspace .Description -Updates part of a workspace +Update part of a workspace .Example Update-AzMonitorWorkspace -Name azps-monitor-workspace -ResourceGroupName azps_test_group -Tag @{"123"="abc"} .Example @@ -27,7 +27,7 @@ Get-AzMonitorWorkspace -Name azps-monitor-workspace -ResourceGroupName azps_test .Inputs Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMonitorWorkspaceIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource +Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource .Notes COMPLEX PARAMETER PROPERTIES @@ -42,10 +42,12 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.monitor/update-azmonitorworkspace #> function Update-AzMonitorWorkspace { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('AzureMonitorWorkspaceName')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [System.String] @@ -54,6 +56,8 @@ param( ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [System.String] # The name of the resource group. @@ -61,6 +65,8 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -71,16 +77,28 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMonitorWorkspaceIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -137,6 +155,14 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -158,10 +184,10 @@ begin { $mapping = @{ UpdateExpanded = 'Az.MonitorWorkspace.private\Update-AzMonitorWorkspace_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.MonitorWorkspace.private\Update-AzMonitorWorkspace_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.MonitorWorkspace.private\Update-AzMonitorWorkspace_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.MonitorWorkspace.private\Update-AzMonitorWorkspace_UpdateViaJsonString'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -175,6 +201,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/Monitor/MonitorWorkspace.Autorest/generated/Module.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/Module.cs index c4b61ac1d22d..a9e1ca1afbed 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/Module.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/Module.cs @@ -28,12 +28,20 @@ public partial class Module public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler(); + private static bool _init = false; + + private static readonly global::System.Object _initLock = new global::System.Object(); + + private static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module _instance; + /// the ISendAsync pipeline instance private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.HttpPipeline _pipeline; /// the ISendAsync pipeline instance (when proxy is enabled) private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.HttpPipeline _pipelineWithProxy; + private static readonly global::System.Object _singletonLock = new global::System.Object(); + public bool _useProxy = false; public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy(); @@ -56,14 +64,11 @@ public partial class Module /// The delegate to get the telemetry info. public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; } - /// Backing field for property. - private static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module _instance; - /// the singleton of this module class - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module()); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module Instance { get { if (_instance == null) { lock (_singletonLock) { if (_instance == null) { _instance = new Module(); }}} return _instance; } } /// The Name of this module - public string Name => @"Az.MonitorWorkspace"; + public string Name => @"Az.Monitor"; /// The delegate to call when this module is loaded (supporting a commmon module). public ModuleLoadPipelineDelegate OnModuleLoad { get; set; } @@ -75,7 +80,7 @@ public partial class Module public global::System.String ProfileName { get; set; } /// The ResourceID for this module (azure arm). - public string ResourceId => @"Az.MonitorWorkspace"; + public string ResourceId => @"Az.Monitor"; /// The delegate to call in WriteObject to sanitize the output object. public SanitizerDelegate SanitizeOutput { get; set; } @@ -125,9 +130,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.HttpP /// Initialization steps performed after the module is loaded. public void Init() { - OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } ); - OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } ); - CustomInit(); + if (_init == false) + { + lock (_initLock) { + if (_init == false) { + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } ); + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } ); + CustomInit(); + _init = true; + } + } + } } /// Creates the module instance. diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Any.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Any.PowerShell.cs index c87bb1ffb20b..952f31de4382 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Any.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Any.PowerShell.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; - /// Any object + /// Anything [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] public partial class Any { @@ -146,7 +146,7 @@ public override string ToString() return ToJsonString(); } } - /// Any object + /// Anything [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] public partial interface IAny diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Any.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Any.cs index 243e4b039f6d..82186ad636ce 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Any.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Any.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; - /// Any object + /// Anything public partial class Any : Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAny, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAnyInternal @@ -19,13 +19,13 @@ public Any() } } - /// Any object + /// Anything public partial interface IAny : Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IJsonSerializable { } - /// Any object + /// Anything internal partial interface IAnyInternal { diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Any.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Any.json.cs index b35b985adb72..1e6e2035afd8 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Any.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Any.json.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; - /// Any object + /// Anything public partial class Any { diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResource.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResource.PowerShell.cs deleted file mode 100644 index cdbe2b50be35..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResource.PowerShell.cs +++ /dev/null @@ -1,350 +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.Monitor.MonitorWorkspace.Models.Api20230403 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; - - /// An Azure Monitor Workspace definition - [System.ComponentModel.TypeConverter(typeof(AzureMonitorWorkspaceResourceTypeConverter))] - public partial class AzureMonitorWorkspaceResource - { - - /// - /// 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 AzureMonitorWorkspaceResource(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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspace) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceTypeConverter.ConvertFrom); - } - if (content.Contains("Etag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).Etag = (string) content.GetValueForProperty("Etag",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).Etag, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)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.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)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.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Metric")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).Metric = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).Metric, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.MetricsTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("DefaultIngestionSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings) content.GetValueForProperty("DefaultIngestionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSetting, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IngestionSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("AccountId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).AccountId, global::System.Convert.ToString); - } - if (content.Contains("PrivateEndpointConnection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).PrivateEndpointConnection = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection[]) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointConnectionTypeConverter.ConvertFrom)); - } - if (content.Contains("PublicNetworkAccess")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess.CreateFrom); - } - if (content.Contains("MetricInternalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).MetricInternalId = (string) content.GetValueForProperty("MetricInternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).MetricInternalId, global::System.Convert.ToString); - } - if (content.Contains("MetricPrometheusQueryEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).MetricPrometheusQueryEndpoint = (string) content.GetValueForProperty("MetricPrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).MetricPrometheusQueryEndpoint, global::System.Convert.ToString); - } - if (content.Contains("DefaultIngestionSettingDataCollectionRuleResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId, global::System.Convert.ToString); - } - if (content.Contains("DefaultIngestionSettingDataCollectionEndpointResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId, 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 AzureMonitorWorkspaceResource(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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspace) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceTypeConverter.ConvertFrom); - } - if (content.Contains("Etag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).Etag = (string) content.GetValueForProperty("Etag",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).Etag, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)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.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)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.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Metric")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).Metric = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).Metric, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.MetricsTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("DefaultIngestionSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings) content.GetValueForProperty("DefaultIngestionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSetting, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IngestionSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("AccountId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).AccountId, global::System.Convert.ToString); - } - if (content.Contains("PrivateEndpointConnection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).PrivateEndpointConnection = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection[]) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointConnectionTypeConverter.ConvertFrom)); - } - if (content.Contains("PublicNetworkAccess")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess.CreateFrom); - } - if (content.Contains("MetricInternalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).MetricInternalId = (string) content.GetValueForProperty("MetricInternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).MetricInternalId, global::System.Convert.ToString); - } - if (content.Contains("MetricPrometheusQueryEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).MetricPrometheusQueryEndpoint = (string) content.GetValueForProperty("MetricPrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).MetricPrometheusQueryEndpoint, global::System.Convert.ToString); - } - if (content.Contains("DefaultIngestionSettingDataCollectionRuleResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId, global::System.Convert.ToString); - } - if (content.Contains("DefaultIngestionSettingDataCollectionEndpointResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId, 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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureMonitorWorkspaceResource(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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureMonitorWorkspaceResource(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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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 Azure Monitor Workspace definition - [System.ComponentModel.TypeConverter(typeof(AzureMonitorWorkspaceResourceTypeConverter))] - public partial interface IAzureMonitorWorkspaceResource - - { - - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceProperties.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceProperties.cs deleted file mode 100644 index 8d895b0cb0ec..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceProperties.cs +++ /dev/null @@ -1,127 +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.Monitor.MonitorWorkspace.Models.Api20230403 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; - - /// Resource properties - public partial class AzureMonitorWorkspaceResourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourcePropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspace __azureMonitorWorkspace = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspace(); - - /// The immutable ID of the Azure Monitor workspace. This property is read-only. - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public string AccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).AccountId; } - - /// The Data Collection Rule and Endpoint used for ingestion by default. - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings DefaultIngestionSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).DefaultIngestionSetting; } - - /// - /// The Azure resource Id of the default data collection endpoint for this workspace. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public string DefaultIngestionSettingDataCollectionEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).DefaultIngestionSettingDataCollectionEndpointResourceId; } - - /// The Azure resource Id of the default data collection rule for this workspace. - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public string DefaultIngestionSettingDataCollectionRuleResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).DefaultIngestionSettingDataCollectionRuleResourceId; } - - /// Information about metrics for the Azure Monitor workspace - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics Metric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).Metric; } - - /// An internal identifier for the metrics container. Only to be used by the system - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public string MetricInternalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).MetricInternalId; } - - /// The Prometheus query endpoint for the workspace - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public string MetricPrometheusQueryEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).MetricPrometheusQueryEndpoint; } - - /// Internal Acessors for AccountId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.AccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).AccountId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).AccountId = value; } - - /// Internal Acessors for DefaultIngestionSetting - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.DefaultIngestionSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).DefaultIngestionSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).DefaultIngestionSetting = value; } - - /// Internal Acessors for DefaultIngestionSettingDataCollectionEndpointResourceId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.DefaultIngestionSettingDataCollectionEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).DefaultIngestionSettingDataCollectionEndpointResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).DefaultIngestionSettingDataCollectionEndpointResourceId = value; } - - /// Internal Acessors for DefaultIngestionSettingDataCollectionRuleResourceId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.DefaultIngestionSettingDataCollectionRuleResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).DefaultIngestionSettingDataCollectionRuleResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).DefaultIngestionSettingDataCollectionRuleResourceId = value; } - - /// Internal Acessors for Metric - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.Metric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).Metric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).Metric = value; } - - /// Internal Acessors for MetricInternalId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.MetricInternalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).MetricInternalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).MetricInternalId = value; } - - /// Internal Acessors for MetricPrometheusQueryEndpoint - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.MetricPrometheusQueryEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).MetricPrometheusQueryEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).MetricPrometheusQueryEndpoint = value; } - - /// Internal Acessors for PrivateEndpointConnection - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection[] Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.PrivateEndpointConnection { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).PrivateEndpointConnection; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).PrivateEndpointConnection = value; } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).ProvisioningState = value; } - - /// Internal Acessors for PublicNetworkAccess - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).PublicNetworkAccess = value; } - - /// List of private endpoint connections - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection[] PrivateEndpointConnection { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).PrivateEndpointConnection; } - - /// - /// The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).ProvisioningState; } - - /// Gets or sets allow or disallow public network access to workspace - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess? PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).PublicNetworkAccess; } - - /// Creates an new instance. - public AzureMonitorWorkspaceResourceProperties() - { - - } - - /// 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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__azureMonitorWorkspace), __azureMonitorWorkspace); - await eventListener.AssertObjectIsValid(nameof(__azureMonitorWorkspace), __azureMonitorWorkspace); - } - } - /// Resource properties - public partial interface IAzureMonitorWorkspaceResourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspace - { - - } - /// Resource properties - internal partial interface IAzureMonitorWorkspaceResourcePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal - { - - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnection.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnection.PowerShell.cs deleted file mode 100644 index c30314977340..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnection.PowerShell.cs +++ /dev/null @@ -1,310 +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.Monitor.MonitorWorkspace.Models.Api40 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; - - /// The private endpoint connection resource. - [System.ComponentModel.TypeConverter(typeof(PrivateEndpointConnectionTypeConverter))] - public partial class PrivateEndpointConnection - { - - /// - /// 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.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new PrivateEndpointConnection(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.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new PrivateEndpointConnection(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.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal PrivateEndpointConnection(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.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointConnectionPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("PrivateEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointTypeConverter.ConvertFrom); - } - if (content.Contains("PrivateLinkServiceConnectionState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateLinkServiceConnectionStateTypeConverter.ConvertFrom); - } - if (content.Contains("GroupId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).GroupId = (string[]) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).GroupId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState.CreateFrom); - } - if (content.Contains("PrivateEndpointId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateEndpointId, global::System.Convert.ToString); - } - if (content.Contains("PrivateLinkServiceConnectionStateDescription")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); - } - if (content.Contains("PrivateLinkServiceConnectionStateActionsRequired")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateActionsRequired = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateActionsRequired",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateActionsRequired, global::System.Convert.ToString); - } - if (content.Contains("PrivateLinkServiceConnectionStateStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateStatus = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus?) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateStatus, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal PrivateEndpointConnection(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.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointConnectionPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("PrivateEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointTypeConverter.ConvertFrom); - } - if (content.Contains("PrivateLinkServiceConnectionState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateLinkServiceConnectionStateTypeConverter.ConvertFrom); - } - if (content.Contains("GroupId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).GroupId = (string[]) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).GroupId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState.CreateFrom); - } - if (content.Contains("PrivateEndpointId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateEndpointId, global::System.Convert.ToString); - } - if (content.Contains("PrivateLinkServiceConnectionStateDescription")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); - } - if (content.Contains("PrivateLinkServiceConnectionStateActionsRequired")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateActionsRequired = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateActionsRequired",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateActionsRequired, global::System.Convert.ToString); - } - if (content.Contains("PrivateLinkServiceConnectionStateStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateStatus = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus?) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateStatus, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 private endpoint connection resource. - [System.ComponentModel.TypeConverter(typeof(PrivateEndpointConnectionTypeConverter))] - public partial interface IPrivateEndpointConnection - - { - - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspace.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspace.PowerShell.cs similarity index 53% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspace.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspace.PowerShell.cs index fc9b10de2388..83cee43b5cf5 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspace.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspace.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AzureMonitorWorkspace partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,49 +78,49 @@ internal AzureMonitorWorkspace(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Metric")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).Metric = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).Metric, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.MetricsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).Metric = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).Metric, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceMetricsTypeConverter.ConvertFrom); } if (content.Contains("DefaultIngestionSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings) content.GetValueForProperty("DefaultIngestionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSetting, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IngestionSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings) content.GetValueForProperty("DefaultIngestionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSetting, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceDefaultIngestionSettingsTypeConverter.ConvertFrom); } if (content.Contains("AccountId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).AccountId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).AccountId, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PrivateEndpointConnection")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).PrivateEndpointConnection = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection[]) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).PrivateEndpointConnection = (System.Collections.Generic.List) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); } if (content.Contains("PublicNetworkAccess")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).PublicNetworkAccess, global::System.Convert.ToString); } if (content.Contains("MetricInternalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).MetricInternalId = (string) content.GetValueForProperty("MetricInternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).MetricInternalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).MetricInternalId = (string) content.GetValueForProperty("MetricInternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).MetricInternalId, global::System.Convert.ToString); } if (content.Contains("MetricPrometheusQueryEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).MetricPrometheusQueryEndpoint = (string) content.GetValueForProperty("MetricPrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).MetricPrometheusQueryEndpoint, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).MetricPrometheusQueryEndpoint = (string) content.GetValueForProperty("MetricPrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).MetricPrometheusQueryEndpoint, global::System.Convert.ToString); } if (content.Contains("DefaultIngestionSettingDataCollectionRuleResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId, global::System.Convert.ToString); } if (content.Contains("DefaultIngestionSettingDataCollectionEndpointResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId, 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. @@ -135,71 +135,69 @@ internal AzureMonitorWorkspace(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("Metric")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).Metric = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).Metric, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.MetricsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).Metric = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).Metric, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceMetricsTypeConverter.ConvertFrom); } if (content.Contains("DefaultIngestionSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings) content.GetValueForProperty("DefaultIngestionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSetting, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IngestionSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings) content.GetValueForProperty("DefaultIngestionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSetting, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceDefaultIngestionSettingsTypeConverter.ConvertFrom); } if (content.Contains("AccountId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).AccountId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).AccountId, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PrivateEndpointConnection")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).PrivateEndpointConnection = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection[]) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).PrivateEndpointConnection = (System.Collections.Generic.List) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); } if (content.Contains("PublicNetworkAccess")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).PublicNetworkAccess, global::System.Convert.ToString); } if (content.Contains("MetricInternalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).MetricInternalId = (string) content.GetValueForProperty("MetricInternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).MetricInternalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).MetricInternalId = (string) content.GetValueForProperty("MetricInternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).MetricInternalId, global::System.Convert.ToString); } if (content.Contains("MetricPrometheusQueryEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).MetricPrometheusQueryEndpoint = (string) content.GetValueForProperty("MetricPrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).MetricPrometheusQueryEndpoint, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).MetricPrometheusQueryEndpoint = (string) content.GetValueForProperty("MetricPrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).MetricPrometheusQueryEndpoint, global::System.Convert.ToString); } if (content.Contains("DefaultIngestionSettingDataCollectionRuleResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId, global::System.Convert.ToString); } if (content.Contains("DefaultIngestionSettingDataCollectionEndpointResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId, 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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspace DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspace DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AzureMonitorWorkspace(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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspace DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspace DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AzureMonitorWorkspace(content); } @@ -209,7 +207,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspace FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspace FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspace.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspace.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspace.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspace.TypeConverter.cs index e339424e6efc..1a229fb7c69b 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspace.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspace.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspace ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspace ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspace).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspace).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspace.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspace.cs similarity index 63% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspace.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspace.cs index ca3c3b4da3d6..5c820de26df3 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspace.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspace.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; /// Properties of an Azure Monitor workspace public partial class AzureMonitorWorkspace : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspace, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspace, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal { /// Backing field for property. @@ -21,89 +21,89 @@ public partial class AzureMonitorWorkspace : public string AccountId { get => this._accountId; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings _defaultIngestionSetting; + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings _defaultIngestionSetting; /// The Data Collection Rule and Endpoint used for ingestion by default. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings DefaultIngestionSetting { get => (this._defaultIngestionSetting = this._defaultIngestionSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IngestionSettings()); } + internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings DefaultIngestionSetting { get => (this._defaultIngestionSetting = this._defaultIngestionSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceDefaultIngestionSettings()); } /// /// The Azure resource Id of the default data collection endpoint for this workspace. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string DefaultIngestionSettingDataCollectionEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)DefaultIngestionSetting).DataCollectionEndpointResourceId; } + public string DefaultIngestionSettingDataCollectionEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)DefaultIngestionSetting).DataCollectionEndpointResourceId; } /// The Azure resource Id of the default data collection rule for this workspace. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string DefaultIngestionSettingDataCollectionRuleResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)DefaultIngestionSetting).DataCollectionRuleResourceId; } + public string DefaultIngestionSettingDataCollectionRuleResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)DefaultIngestionSetting).DataCollectionRuleResourceId; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics _metric; + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics _metric; /// Information about metrics for the Azure Monitor workspace [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics Metric { get => (this._metric = this._metric ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.Metrics()); } + internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics Metric { get => (this._metric = this._metric ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceMetrics()); } /// An internal identifier for the metrics container. Only to be used by the system [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string MetricInternalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)Metric).InternalId; } + public string MetricInternalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)Metric).InternalId; } /// The Prometheus query endpoint for the workspace [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string MetricPrometheusQueryEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)Metric).PrometheusQueryEndpoint; } + public string MetricPrometheusQueryEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)Metric).PrometheusQueryEndpoint; } /// Internal Acessors for AccountId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.AccountId { get => this._accountId; set { {_accountId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.AccountId { get => this._accountId; set { {_accountId = value;} } } /// Internal Acessors for DefaultIngestionSetting - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.DefaultIngestionSetting { get => (this._defaultIngestionSetting = this._defaultIngestionSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IngestionSettings()); set { {_defaultIngestionSetting = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.DefaultIngestionSetting { get => (this._defaultIngestionSetting = this._defaultIngestionSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceDefaultIngestionSettings()); set { {_defaultIngestionSetting = value;} } } /// Internal Acessors for DefaultIngestionSettingDataCollectionEndpointResourceId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.DefaultIngestionSettingDataCollectionEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)DefaultIngestionSetting).DataCollectionEndpointResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)DefaultIngestionSetting).DataCollectionEndpointResourceId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.DefaultIngestionSettingDataCollectionEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)DefaultIngestionSetting).DataCollectionEndpointResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)DefaultIngestionSetting).DataCollectionEndpointResourceId = value ?? null; } /// Internal Acessors for DefaultIngestionSettingDataCollectionRuleResourceId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.DefaultIngestionSettingDataCollectionRuleResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)DefaultIngestionSetting).DataCollectionRuleResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)DefaultIngestionSetting).DataCollectionRuleResourceId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.DefaultIngestionSettingDataCollectionRuleResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)DefaultIngestionSetting).DataCollectionRuleResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)DefaultIngestionSetting).DataCollectionRuleResourceId = value ?? null; } /// Internal Acessors for Metric - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.Metric { get => (this._metric = this._metric ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.Metrics()); set { {_metric = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.Metric { get => (this._metric = this._metric ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceMetrics()); set { {_metric = value;} } } /// Internal Acessors for MetricInternalId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.MetricInternalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)Metric).InternalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)Metric).InternalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.MetricInternalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)Metric).InternalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)Metric).InternalId = value ?? null; } /// Internal Acessors for MetricPrometheusQueryEndpoint - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.MetricPrometheusQueryEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)Metric).PrometheusQueryEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)Metric).PrometheusQueryEndpoint = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.MetricPrometheusQueryEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)Metric).PrometheusQueryEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)Metric).PrometheusQueryEndpoint = value ?? null; } /// Internal Acessors for PrivateEndpointConnection - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection[] Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.PrivateEndpointConnection { get => this._privateEndpointConnection; set { {_privateEndpointConnection = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.PrivateEndpointConnection { get => this._privateEndpointConnection; set { {_privateEndpointConnection = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for PublicNetworkAccess - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal.PublicNetworkAccess { get => this._publicNetworkAccess; set { {_publicNetworkAccess = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.PublicNetworkAccess { get => this._publicNetworkAccess; set { {_publicNetworkAccess = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection[] _privateEndpointConnection; + private System.Collections.Generic.List _privateEndpointConnection; /// List of private endpoint connections [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection[] PrivateEndpointConnection { get => this._privateEndpointConnection; } + public System.Collections.Generic.List PrivateEndpointConnection { get => this._privateEndpointConnection; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState? _provisioningState; + private string _provisioningState; /// /// The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } + public string ProvisioningState { get => this._provisioningState; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess? _publicNetworkAccess; + private string _publicNetworkAccess; /// Gets or sets allow or disallow public network access to workspace [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess? PublicNetworkAccess { get => this._publicNetworkAccess; } + public string PublicNetworkAccess { get => this._publicNetworkAccess; } /// Creates an new instance. public AzureMonitorWorkspace() @@ -119,6 +119,9 @@ public partial interface IAzureMonitorWorkspace : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The immutable ID of the Azure Monitor workspace. This property is read-only.", SerializedName = @"accountId", PossibleTypes = new [] { typeof(string) })] @@ -129,6 +132,9 @@ public partial interface IAzureMonitorWorkspace : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The Azure resource Id of the default data collection endpoint for this workspace.", SerializedName = @"dataCollectionEndpointResourceId", PossibleTypes = new [] { typeof(string) })] @@ -137,6 +143,9 @@ public partial interface IAzureMonitorWorkspace : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The Azure resource Id of the default data collection rule for this workspace.", SerializedName = @"dataCollectionRuleResourceId", PossibleTypes = new [] { typeof(string) })] @@ -145,6 +154,9 @@ public partial interface IAzureMonitorWorkspace : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"An internal identifier for the metrics container. Only to be used by the system", SerializedName = @"internalId", PossibleTypes = new [] { typeof(string) })] @@ -153,6 +165,9 @@ public partial interface IAzureMonitorWorkspace : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The Prometheus query endpoint for the workspace", SerializedName = @"prometheusQueryEndpoint", PossibleTypes = new [] { typeof(string) })] @@ -161,28 +176,39 @@ public partial interface IAzureMonitorWorkspace : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"List of private endpoint connections", SerializedName = @"privateEndpointConnections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection[] PrivateEndpointConnection { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnection) })] + System.Collections.Generic.List PrivateEndpointConnection { get; } /// /// The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Creating", "Succeeded", "Deleting", "Failed", "Canceled")] + string ProvisioningState { get; } /// Gets or sets allow or disallow public network access to workspace [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Gets or sets allow or disallow public network access to workspace", SerializedName = @"publicNetworkAccess", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess? PublicNetworkAccess { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string PublicNetworkAccess { get; } } /// Properties of an Azure Monitor workspace @@ -192,7 +218,7 @@ internal partial interface IAzureMonitorWorkspaceInternal /// The immutable ID of the Azure Monitor workspace. This property is read-only. string AccountId { get; set; } /// The Data Collection Rule and Endpoint used for ingestion by default. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings DefaultIngestionSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings DefaultIngestionSetting { get; set; } /// /// The Azure resource Id of the default data collection endpoint for this workspace. /// @@ -200,19 +226,21 @@ internal partial interface IAzureMonitorWorkspaceInternal /// The Azure resource Id of the default data collection rule for this workspace. string DefaultIngestionSettingDataCollectionRuleResourceId { get; set; } /// Information about metrics for the Azure Monitor workspace - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics Metric { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics Metric { get; set; } /// An internal identifier for the metrics container. Only to be used by the system string MetricInternalId { get; set; } /// The Prometheus query endpoint for the workspace string MetricPrometheusQueryEndpoint { get; set; } /// List of private endpoint connections - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection[] PrivateEndpointConnection { get; set; } + System.Collections.Generic.List PrivateEndpointConnection { get; set; } /// /// The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy. /// - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Creating", "Succeeded", "Deleting", "Failed", "Canceled")] + string ProvisioningState { get; set; } /// Gets or sets allow or disallow public network access to workspace - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string PublicNetworkAccess { get; set; } } } \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspace.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspace.json.cs similarity index 89% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspace.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspace.json.cs index a7e8840a1baa..5936e578d654 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspace.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspace.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -65,23 +65,23 @@ internal AzureMonitorWorkspace(Microsoft.Azure.PowerShell.Cmdlets.Monitor.Monito { return; } - {_metric = If( json?.PropertyT("metrics"), out var __jsonMetrics) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.Metrics.FromJson(__jsonMetrics) : Metric;} - {_defaultIngestionSetting = If( json?.PropertyT("defaultIngestionSettings"), out var __jsonDefaultIngestionSettings) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IngestionSettings.FromJson(__jsonDefaultIngestionSettings) : DefaultIngestionSetting;} - {_accountId = If( json?.PropertyT("accountId"), out var __jsonAccountId) ? (string)__jsonAccountId : (string)AccountId;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_privateEndpointConnection = If( json?.PropertyT("privateEndpointConnections"), out var __jsonPrivateEndpointConnections) ? If( __jsonPrivateEndpointConnections as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection) (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointConnection.FromJson(__u) )) ))() : null : PrivateEndpointConnection;} - {_publicNetworkAccess = If( json?.PropertyT("publicNetworkAccess"), out var __jsonPublicNetworkAccess) ? (string)__jsonPublicNetworkAccess : (string)PublicNetworkAccess;} + {_metric = If( json?.PropertyT("metrics"), out var __jsonMetrics) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceMetrics.FromJson(__jsonMetrics) : _metric;} + {_defaultIngestionSetting = If( json?.PropertyT("defaultIngestionSettings"), out var __jsonDefaultIngestionSettings) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceDefaultIngestionSettings.FromJson(__jsonDefaultIngestionSettings) : _defaultIngestionSetting;} + {_accountId = If( json?.PropertyT("accountId"), out var __jsonAccountId) ? (string)__jsonAccountId : (string)_accountId;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_privateEndpointConnection = If( json?.PropertyT("privateEndpointConnections"), out var __jsonPrivateEndpointConnections) ? If( __jsonPrivateEndpointConnections as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnection) (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointConnection.FromJson(__u) )) ))() : null : _privateEndpointConnection;} + {_publicNetworkAccess = If( json?.PropertyT("publicNetworkAccess"), out var __jsonPublicNetworkAccess) ? (string)__jsonPublicNetworkAccess : (string)_publicNetworkAccess;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspace. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspace. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspace. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspace. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspace FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspace FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new AzureMonitorWorkspace(json) : null; } @@ -105,23 +105,23 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json. { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._metric ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) this._metric.ToJson(null,serializationMode) : null, "metrics" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._defaultIngestionSetting ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) this._defaultIngestionSetting.ToJson(null,serializationMode) : null, "defaultIngestionSettings" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._accountId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._accountId.ToString()) : null, "accountId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { if (null != this._privateEndpointConnection) { @@ -133,7 +133,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json. container.Add("privateEndpointConnections",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._publicNetworkAccess)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._publicNetworkAccess.ToString()) : null, "publicNetworkAccess" ,container.Add ); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceDefaultIngestionSettings.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceDefaultIngestionSettings.PowerShell.cs similarity index 77% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceDefaultIngestionSettings.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceDefaultIngestionSettings.PowerShell.cs index 0aa0929f8667..d7dc4cb98fba 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceDefaultIngestionSettings.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceDefaultIngestionSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AzureMonitorWorkspaceDefaultIngestionSettings partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal AzureMonitorWorkspaceDefaultIngestionSettings(global::System.Collection // actually deserialize if (content.Contains("DataCollectionRuleResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)this).DataCollectionRuleResourceId = (string) content.GetValueForProperty("DataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)this).DataCollectionRuleResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)this).DataCollectionRuleResourceId = (string) content.GetValueForProperty("DataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)this).DataCollectionRuleResourceId, global::System.Convert.ToString); } if (content.Contains("DataCollectionEndpointResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)this).DataCollectionEndpointResourceId = (string) content.GetValueForProperty("DataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)this).DataCollectionEndpointResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)this).DataCollectionEndpointResourceId = (string) content.GetValueForProperty("DataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)this).DataCollectionEndpointResourceId, 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. @@ -103,39 +103,39 @@ internal AzureMonitorWorkspaceDefaultIngestionSettings(global::System.Management // actually deserialize if (content.Contains("DataCollectionRuleResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)this).DataCollectionRuleResourceId = (string) content.GetValueForProperty("DataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)this).DataCollectionRuleResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)this).DataCollectionRuleResourceId = (string) content.GetValueForProperty("DataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)this).DataCollectionRuleResourceId, global::System.Convert.ToString); } if (content.Contains("DataCollectionEndpointResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)this).DataCollectionEndpointResourceId = (string) content.GetValueForProperty("DataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)this).DataCollectionEndpointResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)this).DataCollectionEndpointResourceId = (string) content.GetValueForProperty("DataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)this).DataCollectionEndpointResourceId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceDefaultIngestionSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AzureMonitorWorkspaceDefaultIngestionSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceDefaultIngestionSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AzureMonitorWorkspaceDefaultIngestionSettings(content); } @@ -148,7 +148,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceDefaultIngestionSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceDefaultIngestionSettings.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceDefaultIngestionSettings.TypeConverter.cs similarity index 96% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceDefaultIngestionSettings.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceDefaultIngestionSettings.TypeConverter.cs index 7eb9308def62..46b4a533b84d 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceDefaultIngestionSettings.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceDefaultIngestionSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceDefaultIngestionSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceDefaultIngestionSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceDefaultIngestionSettings.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceDefaultIngestionSettings.cs similarity index 70% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceDefaultIngestionSettings.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceDefaultIngestionSettings.cs index 7f9c1143dc6b..8da88a792aae 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceDefaultIngestionSettings.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceDefaultIngestionSettings.cs @@ -3,37 +3,37 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; /// The Data Collection Rule and Endpoint used for ingestion by default. public partial class AzureMonitorWorkspaceDefaultIngestionSettings : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceDefaultIngestionSettings, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceDefaultIngestionSettingsInternal, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettingsInternal, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings __ingestionSettings = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IngestionSettings(); + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettings __ingestionSettings = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IngestionSettings(); /// /// The Azure resource Id of the default data collection endpoint for this workspace. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public string DataCollectionEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)__ingestionSettings).DataCollectionEndpointResourceId; } + public string DataCollectionEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)__ingestionSettings).DataCollectionEndpointResourceId; } /// The Azure resource Id of the default data collection rule for this workspace. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public string DataCollectionRuleResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)__ingestionSettings).DataCollectionRuleResourceId; } + public string DataCollectionRuleResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)__ingestionSettings).DataCollectionRuleResourceId; } /// Internal Acessors for DataCollectionEndpointResourceId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal.DataCollectionEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)__ingestionSettings).DataCollectionEndpointResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)__ingestionSettings).DataCollectionEndpointResourceId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal.DataCollectionEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)__ingestionSettings).DataCollectionEndpointResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)__ingestionSettings).DataCollectionEndpointResourceId = value ?? null; } /// Internal Acessors for DataCollectionRuleResourceId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal.DataCollectionRuleResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)__ingestionSettings).DataCollectionRuleResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)__ingestionSettings).DataCollectionRuleResourceId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal.DataCollectionRuleResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)__ingestionSettings).DataCollectionRuleResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)__ingestionSettings).DataCollectionRuleResourceId = value ?? null; } /// /// Creates an new instance. @@ -58,13 +58,13 @@ public AzureMonitorWorkspaceDefaultIngestionSettings() /// The Data Collection Rule and Endpoint used for ingestion by default. public partial interface IAzureMonitorWorkspaceDefaultIngestionSettings : Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettings { } /// The Data Collection Rule and Endpoint used for ingestion by default. internal partial interface IAzureMonitorWorkspaceDefaultIngestionSettingsInternal : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal { } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceDefaultIngestionSettings.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceDefaultIngestionSettings.json.cs similarity index 94% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceDefaultIngestionSettings.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceDefaultIngestionSettings.json.cs index ce5bf1746ed2..dd5a72b40dd6 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceDefaultIngestionSettings.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceDefaultIngestionSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -66,18 +66,18 @@ internal AzureMonitorWorkspaceDefaultIngestionSettings(Microsoft.Azure.PowerShel { return; } - __ingestionSettings = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IngestionSettings(json); + __ingestionSettings = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IngestionSettings(json); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceDefaultIngestionSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceDefaultIngestionSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceDefaultIngestionSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new AzureMonitorWorkspaceDefaultIngestionSettings(json) : null; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceMetrics.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceMetrics.PowerShell.cs similarity index 79% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceMetrics.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceMetrics.PowerShell.cs index 346d39bf4caa..c26d818550a4 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceMetrics.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceMetrics.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AzureMonitorWorkspaceMetrics partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal AzureMonitorWorkspaceMetrics(global::System.Collections.IDictionary con // actually deserialize if (content.Contains("PrometheusQueryEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)this).PrometheusQueryEndpoint = (string) content.GetValueForProperty("PrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)this).PrometheusQueryEndpoint, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)this).PrometheusQueryEndpoint = (string) content.GetValueForProperty("PrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)this).PrometheusQueryEndpoint, global::System.Convert.ToString); } if (content.Contains("InternalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)this).InternalId = (string) content.GetValueForProperty("InternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)this).InternalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)this).InternalId = (string) content.GetValueForProperty("InternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)this).InternalId, 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. @@ -103,39 +103,39 @@ internal AzureMonitorWorkspaceMetrics(global::System.Management.Automation.PSObj // actually deserialize if (content.Contains("PrometheusQueryEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)this).PrometheusQueryEndpoint = (string) content.GetValueForProperty("PrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)this).PrometheusQueryEndpoint, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)this).PrometheusQueryEndpoint = (string) content.GetValueForProperty("PrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)this).PrometheusQueryEndpoint, global::System.Convert.ToString); } if (content.Contains("InternalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)this).InternalId = (string) content.GetValueForProperty("InternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)this).InternalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)this).InternalId = (string) content.GetValueForProperty("InternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)this).InternalId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceMetrics DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AzureMonitorWorkspaceMetrics(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceMetrics DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AzureMonitorWorkspaceMetrics(content); } @@ -145,7 +145,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceMetrics FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceMetrics.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceMetrics.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceMetrics.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceMetrics.TypeConverter.cs index f929875a7fe1..1716aea06fb1 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceMetrics.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceMetrics.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceMetrics ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceMetrics).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceMetrics.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceMetrics.cs similarity index 71% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceMetrics.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceMetrics.cs index a35231397de4..0d4502a4fbfe 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceMetrics.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceMetrics.cs @@ -3,35 +3,35 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; /// Information about metrics for the Azure Monitor workspace public partial class AzureMonitorWorkspaceMetrics : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceMetrics, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceMetricsInternal, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetricsInternal, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics __metrics = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.Metrics(); + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetrics __metrics = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Metrics(); /// An internal identifier for the metrics container. Only to be used by the system [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public string InternalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)__metrics).InternalId; } + public string InternalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)__metrics).InternalId; } /// Internal Acessors for InternalId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal.InternalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)__metrics).InternalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)__metrics).InternalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal.InternalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)__metrics).InternalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)__metrics).InternalId = value ?? null; } /// Internal Acessors for PrometheusQueryEndpoint - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal.PrometheusQueryEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)__metrics).PrometheusQueryEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)__metrics).PrometheusQueryEndpoint = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal.PrometheusQueryEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)__metrics).PrometheusQueryEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)__metrics).PrometheusQueryEndpoint = value ?? null; } /// The Prometheus query endpoint for the workspace [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public string PrometheusQueryEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)__metrics).PrometheusQueryEndpoint; } + public string PrometheusQueryEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)__metrics).PrometheusQueryEndpoint; } /// Creates an new instance. public AzureMonitorWorkspaceMetrics() @@ -54,13 +54,13 @@ public AzureMonitorWorkspaceMetrics() /// Information about metrics for the Azure Monitor workspace public partial interface IAzureMonitorWorkspaceMetrics : Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetrics { } /// Information about metrics for the Azure Monitor workspace internal partial interface IAzureMonitorWorkspaceMetricsInternal : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal { } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceMetrics.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceMetrics.json.cs similarity index 94% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceMetrics.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceMetrics.json.cs index c7e5bfbd1abe..d1513e01876b 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceMetrics.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceMetrics.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -65,18 +65,18 @@ internal AzureMonitorWorkspaceMetrics(Microsoft.Azure.PowerShell.Cmdlets.Monitor { return; } - __metrics = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.Metrics(json); + __metrics = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Metrics(json); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceMetrics. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceMetrics. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceMetrics FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new AzureMonitorWorkspaceMetrics(json) : null; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResource.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResource.PowerShell.cs new file mode 100644 index 000000000000..2fd12611b1a4 --- /dev/null +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResource.PowerShell.cs @@ -0,0 +1,350 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; + + /// An Azure Monitor Workspace definition + [System.ComponentModel.TypeConverter(typeof(AzureMonitorWorkspaceResourceTypeConverter))] + public partial class AzureMonitorWorkspaceResource + { + + /// + /// 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 AzureMonitorWorkspaceResource(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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Etag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).Etag = (string) content.GetValueForProperty("Etag",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).Etag, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)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.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)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.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("MetricInternalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).MetricInternalId = (string) content.GetValueForProperty("MetricInternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).MetricInternalId, global::System.Convert.ToString); + } + if (content.Contains("Metric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).Metric = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).Metric, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceMetricsTypeConverter.ConvertFrom); + } + if (content.Contains("DefaultIngestionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings) content.GetValueForProperty("DefaultIngestionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSetting, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceDefaultIngestionSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("AccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).AccountId, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointConnection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).PrivateEndpointConnection = (System.Collections.Generic.List) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + } + if (content.Contains("PublicNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).PublicNetworkAccess, global::System.Convert.ToString); + } + if (content.Contains("MetricPrometheusQueryEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).MetricPrometheusQueryEndpoint = (string) content.GetValueForProperty("MetricPrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).MetricPrometheusQueryEndpoint, global::System.Convert.ToString); + } + if (content.Contains("DefaultIngestionSettingDataCollectionRuleResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId, global::System.Convert.ToString); + } + if (content.Contains("DefaultIngestionSettingDataCollectionEndpointResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId, 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 AzureMonitorWorkspaceResource(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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Etag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).Etag = (string) content.GetValueForProperty("Etag",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).Etag, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)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.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)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.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("MetricInternalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).MetricInternalId = (string) content.GetValueForProperty("MetricInternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).MetricInternalId, global::System.Convert.ToString); + } + if (content.Contains("Metric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).Metric = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).Metric, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceMetricsTypeConverter.ConvertFrom); + } + if (content.Contains("DefaultIngestionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings) content.GetValueForProperty("DefaultIngestionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSetting, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceDefaultIngestionSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("AccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).AccountId, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointConnection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).PrivateEndpointConnection = (System.Collections.Generic.List) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + } + if (content.Contains("PublicNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).PublicNetworkAccess, global::System.Convert.ToString); + } + if (content.Contains("MetricPrometheusQueryEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).MetricPrometheusQueryEndpoint = (string) content.GetValueForProperty("MetricPrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).MetricPrometheusQueryEndpoint, global::System.Convert.ToString); + } + if (content.Contains("DefaultIngestionSettingDataCollectionRuleResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId, global::System.Convert.ToString); + } + if (content.Contains("DefaultIngestionSettingDataCollectionEndpointResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId, 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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureMonitorWorkspaceResource(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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureMonitorWorkspaceResource(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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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 Azure Monitor Workspace definition + [System.ComponentModel.TypeConverter(typeof(AzureMonitorWorkspaceResourceTypeConverter))] + public partial interface IAzureMonitorWorkspaceResource + + { + + } +} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResource.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResource.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResource.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResource.TypeConverter.cs index 442e1f7f5526..09b60a20a54d 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResource.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResource.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResource.cs similarity index 56% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResource.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResource.cs index 3132a16d1d95..3fda93265e07 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResource.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResource.cs @@ -3,38 +3,38 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; /// An Azure Monitor Workspace definition public partial class AzureMonitorWorkspaceResource : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.TrackedResource(); + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.TrackedResource(); /// The immutable ID of the Azure Monitor workspace. This property is read-only. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.DoNotFormat] - public string AccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).AccountId; } + public string AccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).AccountId; } /// /// The Azure resource Id of the default data collection endpoint for this workspace. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.DoNotFormat] - public string DefaultIngestionSettingDataCollectionEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).DefaultIngestionSettingDataCollectionEndpointResourceId; } + public string DefaultIngestionSettingDataCollectionEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).DefaultIngestionSettingDataCollectionEndpointResourceId; } /// The Azure resource Id of the default data collection rule for this workspace. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.DoNotFormat] - public string DefaultIngestionSettingDataCollectionRuleResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).DefaultIngestionSettingDataCollectionRuleResourceId; } + public string DefaultIngestionSettingDataCollectionRuleResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).DefaultIngestionSettingDataCollectionRuleResourceId; } /// Backing field for property. private string _etag; @@ -49,100 +49,118 @@ public partial class AzureMonitorWorkspaceResource : /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.DoNotFormat] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).Id; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.FormatTable(Index = 1)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)__trackedResource).Location = value ; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)__trackedResource).Location = value ?? null; } /// An internal identifier for the metrics container. Only to be used by the system [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.DoNotFormat] - public string MetricInternalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).MetricInternalId; } + public string MetricInternalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).MetricInternalId; } /// The Prometheus query endpoint for the workspace [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.DoNotFormat] - public string MetricPrometheusQueryEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).MetricPrometheusQueryEndpoint; } + public string MetricPrometheusQueryEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).MetricPrometheusQueryEndpoint; } /// Internal Acessors for AccountId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal.AccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).AccountId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).AccountId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal.AccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).AccountId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).AccountId = value ?? null; } /// Internal Acessors for DefaultIngestionSetting - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal.DefaultIngestionSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).DefaultIngestionSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).DefaultIngestionSetting = value; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal.DefaultIngestionSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).DefaultIngestionSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).DefaultIngestionSetting = value ?? null /* model class */; } /// Internal Acessors for DefaultIngestionSettingDataCollectionEndpointResourceId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal.DefaultIngestionSettingDataCollectionEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).DefaultIngestionSettingDataCollectionEndpointResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).DefaultIngestionSettingDataCollectionEndpointResourceId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal.DefaultIngestionSettingDataCollectionEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).DefaultIngestionSettingDataCollectionEndpointResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).DefaultIngestionSettingDataCollectionEndpointResourceId = value ?? null; } /// Internal Acessors for DefaultIngestionSettingDataCollectionRuleResourceId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal.DefaultIngestionSettingDataCollectionRuleResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).DefaultIngestionSettingDataCollectionRuleResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).DefaultIngestionSettingDataCollectionRuleResourceId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal.DefaultIngestionSettingDataCollectionRuleResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).DefaultIngestionSettingDataCollectionRuleResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).DefaultIngestionSettingDataCollectionRuleResourceId = value ?? null; } /// Internal Acessors for Etag - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal.Etag { get => this._etag; set { {_etag = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal.Etag { get => this._etag; set { {_etag = value;} } } /// Internal Acessors for Metric - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal.Metric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).Metric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).Metric = value; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal.Metric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).Metric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).Metric = value ?? null /* model class */; } /// Internal Acessors for MetricInternalId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal.MetricInternalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).MetricInternalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).MetricInternalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal.MetricInternalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).MetricInternalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).MetricInternalId = value ?? null; } /// Internal Acessors for MetricPrometheusQueryEndpoint - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal.MetricPrometheusQueryEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).MetricPrometheusQueryEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).MetricPrometheusQueryEndpoint = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal.MetricPrometheusQueryEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).MetricPrometheusQueryEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).MetricPrometheusQueryEndpoint = value ?? null; } /// Internal Acessors for PrivateEndpointConnection - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection[] Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal.PrivateEndpointConnection { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).PrivateEndpointConnection; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).PrivateEndpointConnection = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal.PrivateEndpointConnection { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).PrivateEndpointConnection; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).PrivateEndpointConnection = value ?? null /* arrayOf */; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspace()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceProperties Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).ProvisioningState = value ?? null; } /// Internal Acessors for PublicNetworkAccess - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceInternal.PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).PublicNetworkAccess = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceInternal.PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).PublicNetworkAccess = value ?? null; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).Name = value ?? null; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemDataLastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).Type = value ?? null; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.FormatTable(Index = 0)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).Name; } /// List of private endpoint connections [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection[] PrivateEndpointConnection { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).PrivateEndpointConnection; } + public System.Collections.Generic.List PrivateEndpointConnection { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).PrivateEndpointConnection; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspace _property; + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceProperties _property; /// Resource properties [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.DoNotFormat] - internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspace Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspace()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceProperties()); set => this._property = value; } /// /// The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.FormatTable(Index = 2)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).ProvisioningState; } + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).ProvisioningState; } /// Gets or sets allow or disallow public network access to workspace [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.FormatTable(Index = 3)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess? PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)Property).PublicNetworkAccess; } + public string PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)Property).PublicNetworkAccess; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] @@ -154,49 +172,49 @@ public partial class AzureMonitorWorkspaceResource : /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).SystemData; } + internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemData = value ?? null /* model class */; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.DoNotFormat] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemDataCreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.DoNotFormat] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemDataCreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemDataCreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.DoNotFormat] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemDataLastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.DoNotFormat] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemDataLastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).SystemDataLastModifiedByType; } /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.DoNotFormat] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__trackedResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__trackedResource).Type; } /// Creates an new instance. public AzureMonitorWorkspaceResource() @@ -219,12 +237,15 @@ public AzureMonitorWorkspaceResource() /// An Azure Monitor Workspace definition public partial interface IAzureMonitorWorkspaceResource : Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResource + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResource { /// The immutable ID of the Azure Monitor workspace. This property is read-only. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The immutable ID of the Azure Monitor workspace. This property is read-only.", SerializedName = @"accountId", PossibleTypes = new [] { typeof(string) })] @@ -235,6 +256,9 @@ public partial interface IAzureMonitorWorkspaceResource : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The Azure resource Id of the default data collection endpoint for this workspace.", SerializedName = @"dataCollectionEndpointResourceId", PossibleTypes = new [] { typeof(string) })] @@ -243,6 +267,9 @@ public partial interface IAzureMonitorWorkspaceResource : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The Azure resource Id of the default data collection rule for this workspace.", SerializedName = @"dataCollectionRuleResourceId", PossibleTypes = new [] { typeof(string) })] @@ -251,6 +278,9 @@ public partial interface IAzureMonitorWorkspaceResource : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Resource entity tag (ETag)", SerializedName = @"etag", PossibleTypes = new [] { typeof(string) })] @@ -259,6 +289,9 @@ public partial interface IAzureMonitorWorkspaceResource : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"An internal identifier for the metrics container. Only to be used by the system", SerializedName = @"internalId", PossibleTypes = new [] { typeof(string) })] @@ -267,6 +300,9 @@ public partial interface IAzureMonitorWorkspaceResource : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The Prometheus query endpoint for the workspace", SerializedName = @"prometheusQueryEndpoint", PossibleTypes = new [] { typeof(string) })] @@ -275,38 +311,49 @@ public partial interface IAzureMonitorWorkspaceResource : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"List of private endpoint connections", SerializedName = @"privateEndpointConnections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection[] PrivateEndpointConnection { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnection) })] + System.Collections.Generic.List PrivateEndpointConnection { get; } /// /// The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Creating", "Succeeded", "Deleting", "Failed", "Canceled")] + string ProvisioningState { get; } /// Gets or sets allow or disallow public network access to workspace [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Gets or sets allow or disallow public network access to workspace", SerializedName = @"publicNetworkAccess", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess? PublicNetworkAccess { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string PublicNetworkAccess { get; } } /// An Azure Monitor Workspace definition internal partial interface IAzureMonitorWorkspaceResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal { /// The immutable ID of the Azure Monitor workspace. This property is read-only. string AccountId { get; set; } /// The Data Collection Rule and Endpoint used for ingestion by default. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings DefaultIngestionSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings DefaultIngestionSetting { get; set; } /// /// The Azure resource Id of the default data collection endpoint for this workspace. /// @@ -316,21 +363,23 @@ internal partial interface IAzureMonitorWorkspaceResourceInternal : /// Resource entity tag (ETag) string Etag { get; set; } /// Information about metrics for the Azure Monitor workspace - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics Metric { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics Metric { get; set; } /// An internal identifier for the metrics container. Only to be used by the system string MetricInternalId { get; set; } /// The Prometheus query endpoint for the workspace string MetricPrometheusQueryEndpoint { get; set; } /// List of private endpoint connections - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection[] PrivateEndpointConnection { get; set; } + System.Collections.Generic.List PrivateEndpointConnection { get; set; } /// Resource properties - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspace Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceProperties Property { get; set; } /// /// The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy. /// - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Creating", "Succeeded", "Deleting", "Failed", "Canceled")] + string ProvisioningState { get; set; } /// Gets or sets allow or disallow public network access to workspace - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string PublicNetworkAccess { get; set; } } } \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResource.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResource.json.cs similarity index 92% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResource.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResource.json.cs index fd6045299981..704537155991 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResource.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -65,20 +65,20 @@ internal AzureMonitorWorkspaceResource(Microsoft.Azure.PowerShell.Cmdlets.Monito { return; } - __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.TrackedResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspace.FromJson(__jsonProperties) : Property;} - {_etag = If( json?.PropertyT("etag"), out var __jsonEtag) ? (string)__jsonEtag : (string)Etag;} + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceProperties.FromJson(__jsonProperties) : _property;} + {_etag = If( json?.PropertyT("etag"), out var __jsonEtag) ? (string)__jsonEtag : (string)_etag;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new AzureMonitorWorkspaceResource(json) : null; } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json. } __trackedResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._etag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._etag.ToString()) : null, "etag" ,container.Add ); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdate.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdate.PowerShell.cs similarity index 78% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdate.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdate.PowerShell.cs index 765955fc8072..1856bed40cb5 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdate.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdate.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AzureMonitorWorkspaceResourceForUpdate partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,13 +78,13 @@ internal AzureMonitorWorkspaceResourceForUpdate(global::System.Collections.IDict // actually deserialize if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResourceForUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceForUpdateTagsTypeConverter.ConvertFrom); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -99,35 +99,35 @@ internal AzureMonitorWorkspaceResourceForUpdate(global::System.Management.Automa // actually deserialize if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResourceForUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceForUpdateTagsTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AzureMonitorWorkspaceResourceForUpdate(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AzureMonitorWorkspaceResourceForUpdate(content); } @@ -140,7 +140,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdate.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdate.TypeConverter.cs similarity index 96% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdate.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdate.TypeConverter.cs index ebcb1bcfc162..3ea3d1c5bf0a 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdate.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdate.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdate.cs similarity index 74% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdate.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdate.cs index 436facc26b68..d999c50779f7 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdate.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdate.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; /// Definition of ARM tracked top level resource properties for update operation public partial class AzureMonitorWorkspaceResourceForUpdate : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdate, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags _tag; + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags _tag; /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResourceForUpdateTags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceForUpdateTags()); set => this._tag = value; } /// Creates an new instance. public AzureMonitorWorkspaceResourceForUpdate() @@ -34,10 +34,13 @@ public partial interface IAzureMonitorWorkspaceResourceForUpdate : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource tags", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags Tag { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags) })] + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags Tag { get; set; } } /// Definition of ARM tracked top level resource properties for update operation @@ -45,7 +48,7 @@ internal partial interface IAzureMonitorWorkspaceResourceForUpdateInternal { /// Resource tags - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags Tag { get; set; } } } \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdate.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdate.json.cs similarity index 93% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdate.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdate.json.cs index 8e542dc5f748..e57debcdb9ea 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdate.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -65,18 +65,18 @@ internal AzureMonitorWorkspaceResourceForUpdate(Microsoft.Azure.PowerShell.Cmdle { return; } - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResourceForUpdateTags.FromJson(__jsonTags) : Tag;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceForUpdateTags.FromJson(__jsonTags) : _tag;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new AzureMonitorWorkspaceResourceForUpdate(json) : null; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdateTags.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdateTags.PowerShell.cs similarity index 87% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdateTags.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdateTags.PowerShell.cs index ab4121a9e820..d0279d8de10f 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdateTags.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdateTags.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AzureMonitorWorkspaceResourceForUpdateTags 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. @@ -82,7 +82,7 @@ internal AzureMonitorWorkspaceResourceForUpdateTags(global::System.Collections.I } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -101,29 +101,29 @@ internal AzureMonitorWorkspaceResourceForUpdateTags(global::System.Management.Au } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AzureMonitorWorkspaceResourceForUpdateTags(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AzureMonitorWorkspaceResourceForUpdateTags(content); } @@ -136,7 +136,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdateTags.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdateTags.TypeConverter.cs similarity index 96% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdateTags.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdateTags.TypeConverter.cs index 55a48e6f0844..51b931e4f8e6 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdateTags.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdateTags.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdateTags.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdateTags.cs similarity index 89% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdateTags.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdateTags.cs index 6174e93cb0a6..83c270da49ef 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdateTags.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdateTags.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; /// Resource tags public partial class AzureMonitorWorkspaceResourceForUpdateTags : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTagsInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTagsInternal { /// diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdateTags.dictionary.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdateTags.dictionary.cs similarity index 96% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdateTags.dictionary.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdateTags.dictionary.cs index f721ceca39ad..2d80d977d1aa 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdateTags.dictionary.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdateTags.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResourceForUpdateTags source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceForUpdateTags source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdateTags.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdateTags.json.cs similarity index 95% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdateTags.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdateTags.json.cs index 2516f67f0903..eb988b1bb083 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceForUpdateTags.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceForUpdateTags.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -71,13 +71,13 @@ internal AzureMonitorWorkspaceResourceForUpdateTags(Microsoft.Azure.PowerShell.C } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new AzureMonitorWorkspaceResourceForUpdateTags(json) : null; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceListResult.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceListResult.PowerShell.cs similarity index 72% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceListResult.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceListResult.PowerShell.cs index 3db373768126..e7bf0f356f1b 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceListResult.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AzureMonitorWorkspaceResourceListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal AzureMonitorWorkspaceResourceListResult(global::System.Collections.IDic // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResultInternal)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. @@ -103,39 +103,39 @@ internal AzureMonitorWorkspaceResourceListResult(global::System.Management.Autom // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResultInternal)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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AzureMonitorWorkspaceResourceListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AzureMonitorWorkspaceResourceListResult(content); } @@ -148,7 +148,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceListResult.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceListResult.TypeConverter.cs similarity index 96% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceListResult.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceListResult.TypeConverter.cs index bf57ea795304..cdeb1e3573a8 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceListResult.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceListResult.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceListResult.cs similarity index 74% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceListResult.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceListResult.cs index 6f4195acd14d..1c8ea4217cc2 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceListResult.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceListResult.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; /// A pageable list of resources public partial class AzureMonitorWorkspaceResourceListResult : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResult, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResult, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResultInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class AzureMonitorWorkspaceResourceListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource[] _value; + private System.Collections.Generic.List _value; /// A list of resources [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public AzureMonitorWorkspaceResourceListResult() @@ -41,6 +41,9 @@ public partial interface IAzureMonitorWorkspaceResourceListResult : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The URL to use for getting the next set of results", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -49,10 +52,13 @@ public partial interface IAzureMonitorWorkspaceResourceListResult : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A list of resources", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource) })] + System.Collections.Generic.List Value { get; set; } } /// A pageable list of resources @@ -62,7 +68,7 @@ internal partial interface IAzureMonitorWorkspaceResourceListResultInternal /// The URL to use for getting the next set of results string NextLink { get; set; } /// A list of resources - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceListResult.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceListResult.json.cs similarity index 89% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceListResult.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceListResult.json.cs index 5488a7769724..1324c9289332 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceListResult.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AzureMonitorWorkspaceResourceListResult(Microsoft.Azure.PowerShell.Cmdl { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource) (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResource.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource) (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResource.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new AzureMonitorWorkspaceResourceListResult(json) : null; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceProperties.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceProperties.PowerShell.cs similarity index 53% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceProperties.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceProperties.PowerShell.cs index 4f9c7cc60fe7..009e120928e3 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceProperties.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AzureMonitorWorkspaceResourceProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,49 +78,49 @@ internal AzureMonitorWorkspaceResourceProperties(global::System.Collections.IDic // actually deserialize if (content.Contains("MetricInternalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).MetricInternalId = (string) content.GetValueForProperty("MetricInternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).MetricInternalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).MetricInternalId = (string) content.GetValueForProperty("MetricInternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).MetricInternalId, global::System.Convert.ToString); } if (content.Contains("MetricPrometheusQueryEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).MetricPrometheusQueryEndpoint = (string) content.GetValueForProperty("MetricPrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).MetricPrometheusQueryEndpoint, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).MetricPrometheusQueryEndpoint = (string) content.GetValueForProperty("MetricPrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).MetricPrometheusQueryEndpoint, global::System.Convert.ToString); } if (content.Contains("DefaultIngestionSettingDataCollectionRuleResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId, global::System.Convert.ToString); } if (content.Contains("DefaultIngestionSettingDataCollectionEndpointResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId, global::System.Convert.ToString); } if (content.Contains("Metric")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).Metric = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).Metric, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.MetricsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).Metric = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).Metric, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceMetricsTypeConverter.ConvertFrom); } if (content.Contains("DefaultIngestionSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings) content.GetValueForProperty("DefaultIngestionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSetting, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IngestionSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings) content.GetValueForProperty("DefaultIngestionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSetting, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceDefaultIngestionSettingsTypeConverter.ConvertFrom); } if (content.Contains("AccountId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).AccountId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).AccountId, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PrivateEndpointConnection")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).PrivateEndpointConnection = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection[]) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).PrivateEndpointConnection = (System.Collections.Generic.List) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); } if (content.Contains("PublicNetworkAccess")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).PublicNetworkAccess, 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. @@ -135,71 +135,71 @@ internal AzureMonitorWorkspaceResourceProperties(global::System.Management.Autom // actually deserialize if (content.Contains("MetricInternalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).MetricInternalId = (string) content.GetValueForProperty("MetricInternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).MetricInternalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).MetricInternalId = (string) content.GetValueForProperty("MetricInternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).MetricInternalId, global::System.Convert.ToString); } if (content.Contains("MetricPrometheusQueryEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).MetricPrometheusQueryEndpoint = (string) content.GetValueForProperty("MetricPrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).MetricPrometheusQueryEndpoint, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).MetricPrometheusQueryEndpoint = (string) content.GetValueForProperty("MetricPrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).MetricPrometheusQueryEndpoint, global::System.Convert.ToString); } if (content.Contains("DefaultIngestionSettingDataCollectionRuleResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionRuleResourceId, global::System.Convert.ToString); } if (content.Contains("DefaultIngestionSettingDataCollectionEndpointResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId = (string) content.GetValueForProperty("DefaultIngestionSettingDataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSettingDataCollectionEndpointResourceId, global::System.Convert.ToString); } if (content.Contains("Metric")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).Metric = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).Metric, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.MetricsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).Metric = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).Metric, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceMetricsTypeConverter.ConvertFrom); } if (content.Contains("DefaultIngestionSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings) content.GetValueForProperty("DefaultIngestionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSetting, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IngestionSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings) content.GetValueForProperty("DefaultIngestionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).DefaultIngestionSetting, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceDefaultIngestionSettingsTypeConverter.ConvertFrom); } if (content.Contains("AccountId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).AccountId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).AccountId, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PrivateEndpointConnection")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).PrivateEndpointConnection = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection[]) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).PrivateEndpointConnection = (System.Collections.Generic.List) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); } if (content.Contains("PublicNetworkAccess")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)this).PublicNetworkAccess, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AzureMonitorWorkspaceResourceProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AzureMonitorWorkspaceResourceProperties(content); } @@ -212,7 +212,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceProperties.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceProperties.TypeConverter.cs similarity index 96% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceProperties.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceProperties.TypeConverter.cs index 66a3733484b1..e3547df8e4e2 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceProperties.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceProperties.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceProperties.cs new file mode 100644 index 000000000000..7eee2aa014e1 --- /dev/null +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceProperties.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; + + /// Resource properties + public partial class AzureMonitorWorkspaceResourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourcePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspace __azureMonitorWorkspace = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspace(); + + /// The immutable ID of the Azure Monitor workspace. This property is read-only. + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] + public string AccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).AccountId; } + + /// The Data Collection Rule and Endpoint used for ingestion by default. + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings DefaultIngestionSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).DefaultIngestionSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).DefaultIngestionSetting = value ?? null /* model class */; } + + /// + /// The Azure resource Id of the default data collection endpoint for this workspace. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] + public string DefaultIngestionSettingDataCollectionEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).DefaultIngestionSettingDataCollectionEndpointResourceId; } + + /// The Azure resource Id of the default data collection rule for this workspace. + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] + public string DefaultIngestionSettingDataCollectionRuleResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).DefaultIngestionSettingDataCollectionRuleResourceId; } + + /// Information about metrics for the Azure Monitor workspace + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics Metric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).Metric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).Metric = value ?? null /* model class */; } + + /// An internal identifier for the metrics container. Only to be used by the system + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] + public string MetricInternalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).MetricInternalId; } + + /// The Prometheus query endpoint for the workspace + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] + public string MetricPrometheusQueryEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).MetricPrometheusQueryEndpoint; } + + /// Internal Acessors for AccountId + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.AccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).AccountId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).AccountId = value ?? null; } + + /// Internal Acessors for DefaultIngestionSetting + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceDefaultIngestionSettings Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.DefaultIngestionSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).DefaultIngestionSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).DefaultIngestionSetting = value ?? null /* model class */; } + + /// Internal Acessors for DefaultIngestionSettingDataCollectionEndpointResourceId + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.DefaultIngestionSettingDataCollectionEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).DefaultIngestionSettingDataCollectionEndpointResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).DefaultIngestionSettingDataCollectionEndpointResourceId = value ?? null; } + + /// Internal Acessors for DefaultIngestionSettingDataCollectionRuleResourceId + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.DefaultIngestionSettingDataCollectionRuleResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).DefaultIngestionSettingDataCollectionRuleResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).DefaultIngestionSettingDataCollectionRuleResourceId = value ?? null; } + + /// Internal Acessors for Metric + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceMetrics Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.Metric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).Metric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).Metric = value ?? null /* model class */; } + + /// Internal Acessors for MetricInternalId + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.MetricInternalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).MetricInternalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).MetricInternalId = value ?? null; } + + /// Internal Acessors for MetricPrometheusQueryEndpoint + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.MetricPrometheusQueryEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).MetricPrometheusQueryEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).MetricPrometheusQueryEndpoint = value ?? null; } + + /// Internal Acessors for PrivateEndpointConnection + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.PrivateEndpointConnection { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).PrivateEndpointConnection; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).PrivateEndpointConnection = value ?? null /* arrayOf */; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).ProvisioningState = value ?? null; } + + /// Internal Acessors for PublicNetworkAccess + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal.PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).PublicNetworkAccess = value ?? null; } + + /// List of private endpoint connections + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] + public System.Collections.Generic.List PrivateEndpointConnection { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).PrivateEndpointConnection; } + + /// + /// The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).ProvisioningState; } + + /// Gets or sets allow or disallow public network access to workspace + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] + public string PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal)__azureMonitorWorkspace).PublicNetworkAccess; } + + /// Creates an new instance. + public AzureMonitorWorkspaceResourceProperties() + { + + } + + /// 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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureMonitorWorkspace), __azureMonitorWorkspace); + await eventListener.AssertObjectIsValid(nameof(__azureMonitorWorkspace), __azureMonitorWorkspace); + } + } + /// Resource properties + public partial interface IAzureMonitorWorkspaceResourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspace + { + + } + /// Resource properties + internal partial interface IAzureMonitorWorkspaceResourcePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceInternal + { + + } +} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceProperties.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceProperties.json.cs similarity index 94% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceProperties.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceProperties.json.cs index 655bcddf4b25..9b1f6429c8eb 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/AzureMonitorWorkspaceResourceProperties.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/AzureMonitorWorkspaceResourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -65,18 +65,18 @@ internal AzureMonitorWorkspaceResourceProperties(Microsoft.Azure.PowerShell.Cmdl { return; } - __azureMonitorWorkspace = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspace(json); + __azureMonitorWorkspace = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspace(json); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new AzureMonitorWorkspaceResourceProperties(json) : null; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs similarity index 78% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs index bb476df2ba3d..5b81c771f445 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -63,35 +63,33 @@ public partial class ErrorAdditionalInfo 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.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ErrorAdditionalInfo(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.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ErrorAdditionalInfo(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -106,17 +104,17 @@ internal ErrorAdditionalInfo(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Info")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AnyTypeConverter.ConvertFrom); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -131,11 +129,11 @@ internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Info")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AnyTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } @@ -145,7 +143,7 @@ internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject conte /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs index b2a938b12747..4740746f4988 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfo).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorAdditionalInfo.cs similarity index 87% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorAdditionalInfo.cs index 3ace0b1d954d..621b0631e87c 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorAdditionalInfo.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; /// The resource management error additional info. public partial class ErrorAdditionalInfo : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfoInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfo, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfoInternal { /// Backing field for property. @@ -21,10 +21,10 @@ public partial class ErrorAdditionalInfo : public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAny Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Any()); } /// Internal Acessors for Info - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Any()); set { {_info = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Any()); set { {_info = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _type; @@ -47,6 +47,9 @@ public partial interface IErrorAdditionalInfo : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The additional info.", SerializedName = @"info", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAny) })] @@ -55,6 +58,9 @@ public partial interface IErrorAdditionalInfo : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The additional info type.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs similarity index 94% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs index 1635e6b5d6a5..c863d4aeb294 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorW { return; } - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Any.FromJson(__jsonInfo) : Info;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Any.FromJson(__jsonInfo) : _info;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfo. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfo. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new ErrorAdditionalInfo(json) : null; } @@ -101,11 +101,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json. { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) this._info.ToJson(null,serializationMode) : null, "info" ,container.Add ); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorDetail.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs similarity index 66% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorDetail.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs index 796659808881..83c98bf4df84 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorDetail.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class ErrorDetail 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.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ErrorDetail(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.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ErrorDetail(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,29 +104,29 @@ internal ErrorDetail(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -141,23 +141,23 @@ internal ErrorDetail(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -167,7 +167,7 @@ internal ErrorDetail(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorDetail.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorDetail.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs index 5efa70156136..d1151599a369 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorDetail.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetail ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetail).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorDetail.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorDetail.cs similarity index 67% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorDetail.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorDetail.cs index fe72c4d49c53..dea860a7e7d2 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorDetail.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorDetail.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; /// The error detail. public partial class ErrorDetail : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetail, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo[] _additionalInfo; + private System.Collections.Generic.List _additionalInfo; /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get => this._additionalInfo; } + public System.Collections.Generic.List AdditionalInfo { get => this._additionalInfo; } /// Backing field for property. private string _code; @@ -28,11 +28,11 @@ public partial class ErrorDetail : public string Code { get => this._code; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail[] _detail; + private System.Collections.Generic.List _detail; /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail[] Detail { get => this._detail; } + public System.Collections.Generic.List Detail { get => this._detail; } /// Backing field for property. private string _message; @@ -42,19 +42,19 @@ public partial class ErrorDetail : public string Message { get => this._message; } /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } /// Backing field for property. private string _target; @@ -77,14 +77,20 @@ public partial interface IErrorDetail : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error additional info.", SerializedName = @"additionalInfo", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error code.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -93,14 +99,20 @@ public partial interface IErrorDetail : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error details.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error message.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -109,6 +121,9 @@ public partial interface IErrorDetail : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error target.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] @@ -120,11 +135,11 @@ internal partial interface IErrorDetailInternal { /// The error additional info. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + System.Collections.Generic.List AdditionalInfo { get; set; } /// The error code. string Code { get; set; } /// The error details. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail[] Detail { get; set; } + System.Collections.Generic.List Detail { get; set; } /// The error message. string Message { get; set; } /// The error target. diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorDetail.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorDetail.json.cs similarity index 88% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorDetail.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorDetail.json.cs index d4f10889b372..715a87213121 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorDetail.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorDetail.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -65,22 +65,22 @@ internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace { return; } - {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} - {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} - {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorDetail.FromJson(__u) )) ))() : null : Detail;} - {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : AdditionalInfo;} + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)_target;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Models.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorDetail.FromJson(__u) )) ))() : null : _detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : _additionalInfo;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetail. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetail. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null; } @@ -104,19 +104,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json. { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { if (null != this._detail) { @@ -128,7 +128,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json. container.Add("details",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { if (null != this._additionalInfo) { diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorResponse.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs similarity index 63% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorResponse.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs index fcb126cf8f57..0d26d38326d2 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorResponse.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -66,33 +66,33 @@ public partial class ErrorResponse 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.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ErrorResponse(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.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ErrorResponse(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -107,33 +107,33 @@ internal ErrorResponse(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorDetailTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorDetailTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -148,27 +148,27 @@ internal ErrorResponse(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorDetailTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorDetailTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -178,7 +178,7 @@ internal ErrorResponse(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorResponse.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorResponse.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs index 9837965a86b1..0f0e9bd5b527 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorResponse.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponse ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponse).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorResponse.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorResponse.cs similarity index 59% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorResponse.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorResponse.cs index 4b17db19fef5..fb01084a3c6d 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorResponse.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorResponse.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -12,54 +12,54 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api /// the OData error response format.). /// public partial class ErrorResponse : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal { /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)Error).AdditionalInfo; } + public System.Collections.Generic.List AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)Error).AdditionalInfo; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)Error).Code; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)Error).Code; } /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)Error).Detail; } + public System.Collections.Generic.List Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)Error).Detail; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail _error; + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetail _error; /// The error object. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorDetail()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorDetail()); set => this._error = value; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)Error).Message; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)Error).Message; } /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)Error).AdditionalInfo = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)Error).AdditionalInfo = value ?? null /* arrayOf */; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)Error).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)Error).Code = value ?? null; } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)Error).Detail = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)Error).Detail = value ?? null /* arrayOf */; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorDetail()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorDetail()); set { {_error = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)Error).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)Error).Message = value ?? null; } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)Error).Target = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)Error).Target = value ?? null; } /// The error target. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetailInternal)Error).Target; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetailInternal)Error).Target; } /// Creates an new instance. public ErrorResponse() @@ -76,14 +76,20 @@ public partial interface IErrorResponse : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error additional info.", SerializedName = @"additionalInfo", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error code.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -92,14 +98,20 @@ public partial interface IErrorResponse : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error details.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error message.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -108,6 +120,9 @@ public partial interface IErrorResponse : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error target.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] @@ -120,13 +135,13 @@ internal partial interface IErrorResponseInternal { /// The error additional info. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + System.Collections.Generic.List AdditionalInfo { get; set; } /// The error code. string Code { get; set; } /// The error details. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail[] Detail { get; set; } + System.Collections.Generic.List Detail { get; set; } /// The error object. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorDetail Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorDetail Error { get; set; } /// The error message. string Message { get; set; } /// The error target. diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorResponse.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorResponse.json.cs similarity index 95% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorResponse.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorResponse.json.cs index 2b4f284c29eb..08f3c87d8c90 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ErrorResponse.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ErrorResponse.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -68,18 +68,18 @@ internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspa { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorDetail.FromJson(__jsonError) : Error;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorDetail.FromJson(__jsonError) : _error;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponse. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponse. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/IngestionSettings.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/IngestionSettings.PowerShell.cs similarity index 77% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/IngestionSettings.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/IngestionSettings.PowerShell.cs index 72299836836b..3dbbaee1387a 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/IngestionSettings.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/IngestionSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class IngestionSettings 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.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new IngestionSettings(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.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new IngestionSettings(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal IngestionSettings(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("DataCollectionRuleResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)this).DataCollectionRuleResourceId = (string) content.GetValueForProperty("DataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)this).DataCollectionRuleResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)this).DataCollectionRuleResourceId = (string) content.GetValueForProperty("DataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)this).DataCollectionRuleResourceId, global::System.Convert.ToString); } if (content.Contains("DataCollectionEndpointResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)this).DataCollectionEndpointResourceId = (string) content.GetValueForProperty("DataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)this).DataCollectionEndpointResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)this).DataCollectionEndpointResourceId = (string) content.GetValueForProperty("DataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)this).DataCollectionEndpointResourceId, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal IngestionSettings(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("DataCollectionRuleResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)this).DataCollectionRuleResourceId = (string) content.GetValueForProperty("DataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)this).DataCollectionRuleResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)this).DataCollectionRuleResourceId = (string) content.GetValueForProperty("DataCollectionRuleResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)this).DataCollectionRuleResourceId, global::System.Convert.ToString); } if (content.Contains("DataCollectionEndpointResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)this).DataCollectionEndpointResourceId = (string) content.GetValueForProperty("DataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal)this).DataCollectionEndpointResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)this).DataCollectionEndpointResourceId = (string) content.GetValueForProperty("DataCollectionEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal)this).DataCollectionEndpointResourceId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/IngestionSettings.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/IngestionSettings.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/IngestionSettings.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/IngestionSettings.TypeConverter.cs index a6a4027044e7..fa5b03ec01f3 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/IngestionSettings.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/IngestionSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/IngestionSettings.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/IngestionSettings.cs similarity index 87% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/IngestionSettings.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/IngestionSettings.cs index 4e06db6785ad..6ab5378a75be 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/IngestionSettings.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/IngestionSettings.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; /// Settings for data ingestion public partial class IngestionSettings : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettings, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal { /// Backing field for property. @@ -30,10 +30,10 @@ public partial class IngestionSettings : public string DataCollectionRuleResourceId { get => this._dataCollectionRuleResourceId; } /// Internal Acessors for DataCollectionEndpointResourceId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal.DataCollectionEndpointResourceId { get => this._dataCollectionEndpointResourceId; set { {_dataCollectionEndpointResourceId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal.DataCollectionEndpointResourceId { get => this._dataCollectionEndpointResourceId; set { {_dataCollectionEndpointResourceId = value;} } } /// Internal Acessors for DataCollectionRuleResourceId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettingsInternal.DataCollectionRuleResourceId { get => this._dataCollectionRuleResourceId; set { {_dataCollectionRuleResourceId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettingsInternal.DataCollectionRuleResourceId { get => this._dataCollectionRuleResourceId; set { {_dataCollectionRuleResourceId = value;} } } /// Creates an new instance. public IngestionSettings() @@ -51,6 +51,9 @@ public partial interface IIngestionSettings : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The Azure resource Id of the default data collection endpoint for this workspace.", SerializedName = @"dataCollectionEndpointResourceId", PossibleTypes = new [] { typeof(string) })] @@ -59,6 +62,9 @@ public partial interface IIngestionSettings : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The Azure resource Id of the default data collection rule for this workspace.", SerializedName = @"dataCollectionRuleResourceId", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/IngestionSettings.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/IngestionSettings.json.cs similarity index 94% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/IngestionSettings.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/IngestionSettings.json.cs index 3412d9259b1c..ddc8e9b8db5d 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/IngestionSettings.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/IngestionSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class IngestionSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IIngestionSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IIngestionSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new IngestionSettings(json) : null; } @@ -77,8 +77,8 @@ internal IngestionSettings(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWor { return; } - {_dataCollectionRuleResourceId = If( json?.PropertyT("dataCollectionRuleResourceId"), out var __jsonDataCollectionRuleResourceId) ? (string)__jsonDataCollectionRuleResourceId : (string)DataCollectionRuleResourceId;} - {_dataCollectionEndpointResourceId = If( json?.PropertyT("dataCollectionEndpointResourceId"), out var __jsonDataCollectionEndpointResourceId) ? (string)__jsonDataCollectionEndpointResourceId : (string)DataCollectionEndpointResourceId;} + {_dataCollectionRuleResourceId = If( json?.PropertyT("dataCollectionRuleResourceId"), out var __jsonDataCollectionRuleResourceId) ? (string)__jsonDataCollectionRuleResourceId : (string)_dataCollectionRuleResourceId;} + {_dataCollectionEndpointResourceId = If( json?.PropertyT("dataCollectionEndpointResourceId"), out var __jsonDataCollectionEndpointResourceId) ? (string)__jsonDataCollectionEndpointResourceId : (string)_dataCollectionEndpointResourceId;} AfterFromJson(json); } @@ -101,11 +101,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json. { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._dataCollectionRuleResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._dataCollectionRuleResourceId.ToString()) : null, "dataCollectionRuleResourceId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._dataCollectionEndpointResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._dataCollectionEndpointResourceId.ToString()) : null, "dataCollectionEndpointResourceId" ,container.Add ); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/Metrics.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Metrics.PowerShell.cs similarity index 79% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/Metrics.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Metrics.PowerShell.cs index 7165f8c028d6..f01c785e3e46 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/Metrics.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Metrics.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Metrics 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.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetrics DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Metrics(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.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetrics DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Metrics(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetrics FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,17 +111,17 @@ internal Metrics(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("PrometheusQueryEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)this).PrometheusQueryEndpoint = (string) content.GetValueForProperty("PrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)this).PrometheusQueryEndpoint, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)this).PrometheusQueryEndpoint = (string) content.GetValueForProperty("PrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)this).PrometheusQueryEndpoint, global::System.Convert.ToString); } if (content.Contains("InternalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)this).InternalId = (string) content.GetValueForProperty("InternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)this).InternalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)this).InternalId = (string) content.GetValueForProperty("InternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)this).InternalId, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -136,11 +136,11 @@ internal Metrics(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("PrometheusQueryEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)this).PrometheusQueryEndpoint = (string) content.GetValueForProperty("PrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)this).PrometheusQueryEndpoint, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)this).PrometheusQueryEndpoint = (string) content.GetValueForProperty("PrometheusQueryEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)this).PrometheusQueryEndpoint, global::System.Convert.ToString); } if (content.Contains("InternalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)this).InternalId = (string) content.GetValueForProperty("InternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal)this).InternalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)this).InternalId = (string) content.GetValueForProperty("InternalId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal)this).InternalId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/Metrics.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Metrics.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/Metrics.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Metrics.TypeConverter.cs index 94d4b69ae7d9..f80ae06a0b6b 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/Metrics.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Metrics.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetrics ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetrics).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/Metrics.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Metrics.cs similarity index 88% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/Metrics.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Metrics.cs index a7774b01859d..134b55e381be 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/Metrics.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Metrics.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; /// Information about metrics for the workspace public partial class Metrics : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetrics, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal { /// Backing field for property. @@ -21,10 +21,10 @@ public partial class Metrics : public string InternalId { get => this._internalId; } /// Internal Acessors for InternalId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal.InternalId { get => this._internalId; set { {_internalId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal.InternalId { get => this._internalId; set { {_internalId = value;} } } /// Internal Acessors for PrometheusQueryEndpoint - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetricsInternal.PrometheusQueryEndpoint { get => this._prometheusQueryEndpoint; set { {_prometheusQueryEndpoint = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetricsInternal.PrometheusQueryEndpoint { get => this._prometheusQueryEndpoint; set { {_prometheusQueryEndpoint = value;} } } /// Backing field for property. private string _prometheusQueryEndpoint; @@ -47,6 +47,9 @@ public partial interface IMetrics : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"An internal identifier for the metrics container. Only to be used by the system", SerializedName = @"internalId", PossibleTypes = new [] { typeof(string) })] @@ -55,6 +58,9 @@ public partial interface IMetrics : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The Prometheus query endpoint for the workspace", SerializedName = @"prometheusQueryEndpoint", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/Metrics.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Metrics.json.cs similarity index 95% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/Metrics.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Metrics.json.cs index 8a381efe5227..4f044351ec1f 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api20230403/Metrics.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Metrics.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class Metrics partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetrics. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetrics. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IMetrics FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IMetrics FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new Metrics(json) : null; } @@ -77,8 +77,8 @@ internal Metrics(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Run { return; } - {_prometheusQueryEndpoint = If( json?.PropertyT("prometheusQueryEndpoint"), out var __jsonPrometheusQueryEndpoint) ? (string)__jsonPrometheusQueryEndpoint : (string)PrometheusQueryEndpoint;} - {_internalId = If( json?.PropertyT("internalId"), out var __jsonInternalId) ? (string)__jsonInternalId : (string)InternalId;} + {_prometheusQueryEndpoint = If( json?.PropertyT("prometheusQueryEndpoint"), out var __jsonPrometheusQueryEndpoint) ? (string)__jsonPrometheusQueryEndpoint : (string)_prometheusQueryEndpoint;} + {_internalId = If( json?.PropertyT("internalId"), out var __jsonInternalId) ? (string)__jsonInternalId : (string)_internalId;} AfterFromJson(json); } @@ -101,11 +101,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json. { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._prometheusQueryEndpoint)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._prometheusQueryEndpoint.ToString()) : null, "prometheusQueryEndpoint" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._internalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._internalId.ToString()) : null, "internalId" ,container.Add ); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/MonitorWorkspaceIdentity.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/MonitorWorkspaceIdentity.cs index 885e0fc87b1c..05d66d3eac5f 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/MonitorWorkspaceIdentity.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/MonitorWorkspaceIdentity.cs @@ -53,6 +53,9 @@ public partial interface IMonitorWorkspaceIdentity : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Azure Monitor workspace. The name is case insensitive", SerializedName = @"azureMonitorWorkspaceName", PossibleTypes = new [] { typeof(string) })] @@ -61,6 +64,9 @@ public partial interface IMonitorWorkspaceIdentity : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource identity path", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -69,6 +75,9 @@ public partial interface IMonitorWorkspaceIdentity : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the resource group. The name is case insensitive.", SerializedName = @"resourceGroupName", PossibleTypes = new [] { typeof(string) })] @@ -77,6 +86,9 @@ public partial interface IMonitorWorkspaceIdentity : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/MonitorWorkspaceIdentity.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/MonitorWorkspaceIdentity.json.cs index 2e01d8d53e11..682d2fe19c4e 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/MonitorWorkspaceIdentity.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/MonitorWorkspaceIdentity.json.cs @@ -76,10 +76,10 @@ internal MonitorWorkspaceIdentity(Microsoft.Azure.PowerShell.Cmdlets.Monitor.Mon { return; } - {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} - {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName;} - {_azureMonitorWorkspaceName = If( json?.PropertyT("azureMonitorWorkspaceName"), out var __jsonAzureMonitorWorkspaceName) ? (string)__jsonAzureMonitorWorkspaceName : (string)AzureMonitorWorkspaceName;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)_subscriptionId;} + {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)_resourceGroupName;} + {_azureMonitorWorkspaceName = If( json?.PropertyT("azureMonitorWorkspaceName"), out var __jsonAzureMonitorWorkspaceName) ? (string)__jsonAzureMonitorWorkspaceName : (string)_azureMonitorWorkspaceName;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/Operation.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Operation.PowerShell.cs similarity index 61% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/Operation.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Operation.PowerShell.cs index c2de96e6967b..cb4dcdc9ea8b 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/Operation.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Operation.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -65,27 +65,27 @@ public partial class Operation 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.Monitor.MonitorWorkspace.Models.Api30.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Operation(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.Monitor.MonitorWorkspace.Models.Api30.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Operation(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,45 +113,45 @@ internal Operation(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Display")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.OperationDisplayTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.OperationDisplayTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("IsDataAction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Origin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.Origin?) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).Origin, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.Origin.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).Origin, global::System.Convert.ToString); } if (content.Contains("ActionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).ActionType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ActionType?) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).ActionType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ActionType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).ActionType, global::System.Convert.ToString); } if (content.Contains("DisplayProvider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); } if (content.Contains("DisplayResource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); } if (content.Contains("DisplayOperation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); } if (content.Contains("DisplayDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).DisplayDescription, 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. @@ -166,39 +166,39 @@ internal Operation(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Display")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.OperationDisplayTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.OperationDisplayTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("IsDataAction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Origin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.Origin?) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).Origin, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.Origin.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).Origin, global::System.Convert.ToString); } if (content.Contains("ActionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).ActionType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ActionType?) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).ActionType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ActionType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).ActionType, global::System.Convert.ToString); } if (content.Contains("DisplayProvider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); } if (content.Contains("DisplayResource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); } if (content.Contains("DisplayOperation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); } if (content.Contains("DisplayDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/Operation.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Operation.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/Operation.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Operation.TypeConverter.cs index 9cf89acd27a1..700a2d7277c2 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/Operation.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Operation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/Operation.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Operation.cs similarity index 74% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/Operation.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Operation.cs index 2b9035e515e3..f9ac54ce31ab 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/Operation.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Operation.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -11,50 +11,50 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api /// Details of a REST API operation, returned from the Resource Provider Operations API /// public partial class Operation : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperation, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperation, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ActionType? _actionType; + private string _actionType; /// /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ActionType? ActionType { get => this._actionType; } + public string ActionType { get => this._actionType; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplay _display; + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplay _display; /// Localized display information for this particular operation. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.OperationDisplay()); set => this._display = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.OperationDisplay()); set => this._display = value; } /// /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)Display).Description; } + public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)Display).Description; } /// /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", /// "Restart Virtual Machine". /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)Display).Operation; } + public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)Display).Operation; } /// /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)Display).Provider; } + public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)Display).Provider; } /// /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)Display).Resource; } + public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)Display).Resource; } /// Backing field for property. private bool? _isDataAction; @@ -67,31 +67,31 @@ public partial class Operation : public bool? IsDataAction { get => this._isDataAction; } /// Internal Acessors for ActionType - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ActionType? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal.ActionType { get => this._actionType; set { {_actionType = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal.ActionType { get => this._actionType; set { {_actionType = value;} } } /// Internal Acessors for Display - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.OperationDisplay()); set { {_display = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.OperationDisplay()); set { {_display = value;} } } /// Internal Acessors for DisplayDescription - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)Display).Description = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)Display).Description = value ?? null; } /// Internal Acessors for DisplayOperation - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)Display).Operation = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)Display).Operation = value ?? null; } /// Internal Acessors for DisplayProvider - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)Display).Provider = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)Display).Provider = value ?? null; } /// Internal Acessors for DisplayResource - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)Display).Resource = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)Display).Resource = value ?? null; } /// Internal Acessors for IsDataAction - bool? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } } + bool? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Origin - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.Origin? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationInternal.Origin { get => this._origin; set { {_origin = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationInternal.Origin { get => this._origin; set { {_origin = value;} } } /// Backing field for property. private string _name; @@ -104,14 +104,14 @@ public partial class Operation : public string Name { get => this._name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.Origin? _origin; + private string _origin; /// /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is /// "user,system" /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.Origin? Origin { get => this._origin; } + public string Origin { get => this._origin; } /// Creates an new instance. public Operation() @@ -129,16 +129,23 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Enum. Indicates the action type. ""Internal"" refers to actions that are for internal only APIs.", SerializedName = @"actionType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ActionType) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ActionType? ActionType { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Internal")] + string ActionType { get; } /// /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The short, localized friendly description of the operation; suitable for tool tips and detailed views.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -150,6 +157,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The concise, localized friendly name for the operation; suitable for dropdowns. E.g. ""Create or Update Virtual Machine"", ""Restart Virtual Machine"".", SerializedName = @"operation", PossibleTypes = new [] { typeof(string) })] @@ -160,6 +170,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The localized friendly form of the resource provider name, e.g. ""Microsoft Monitoring Insights"" or ""Microsoft Compute"".", SerializedName = @"provider", PossibleTypes = new [] { typeof(string) })] @@ -170,6 +183,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The localized friendly name of the resource type related to this operation. E.g. ""Virtual Machines"" or ""Job Schedule Collections"".", SerializedName = @"resource", PossibleTypes = new [] { typeof(string) })] @@ -181,6 +197,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Whether the operation applies to data-plane. This is ""true"" for data-plane operations and ""false"" for ARM/control-plane operations.", SerializedName = @"isDataAction", PossibleTypes = new [] { typeof(bool) })] @@ -192,6 +211,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The name of the operation, as per Resource-Based Access Control (RBAC). Examples: ""Microsoft.Compute/virtualMachines/write"", ""Microsoft.Compute/virtualMachines/capture/action""", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -203,10 +225,14 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is ""user,system""", SerializedName = @"origin", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.Origin) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.Origin? Origin { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("user", "system", "user,system")] + string Origin { get; } } /// Details of a REST API operation, returned from the Resource Provider Operations API @@ -216,9 +242,10 @@ internal partial interface IOperationInternal /// /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. /// - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ActionType? ActionType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Internal")] + string ActionType { get; set; } /// Localized display information for this particular operation. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplay Display { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplay Display { get; set; } /// /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. /// @@ -250,7 +277,8 @@ internal partial interface IOperationInternal /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is /// "user,system" /// - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.Origin? Origin { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("user", "system", "user,system")] + string Origin { get; set; } } } \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/Operation.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Operation.json.cs similarity index 94% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/Operation.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Operation.json.cs index f9a8bca95c76..fdf5649079a0 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/Operation.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Operation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class Operation partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperation. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperation. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperation. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new Operation(json) : null; } @@ -79,11 +79,11 @@ internal Operation(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.R { return; } - {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.OperationDisplay.FromJson(__jsonDisplay) : Display;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : IsDataAction;} - {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin;} - {_actionType = If( json?.PropertyT("actionType"), out var __jsonActionType) ? (string)__jsonActionType : (string)ActionType;} + {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.OperationDisplay.FromJson(__jsonDisplay) : _display;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : _isDataAction;} + {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)_origin;} + {_actionType = If( json?.PropertyT("actionType"), out var __jsonActionType) ? (string)__jsonActionType : (string)_actionType;} AfterFromJson(json); } @@ -107,19 +107,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json. return container; } AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._actionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._actionType.ToString()) : null, "actionType" ,container.Add ); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationDisplay.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs similarity index 73% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationDisplay.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs index 2b1b2a93dce7..2f41154ef521 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationDisplay.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class OperationDisplay 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.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationDisplay(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.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationDisplay(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,25 +111,25 @@ internal OperationDisplay(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Provider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); } if (content.Contains("Resource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); } if (content.Contains("Operation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -146,19 +144,19 @@ internal OperationDisplay(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Provider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); } if (content.Contains("Resource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); } if (content.Contains("Operation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationDisplay.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationDisplay.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs index 15ee1f98eca5..1e774ad93041 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationDisplay.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplay ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplay ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplay).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplay).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationDisplay.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationDisplay.cs similarity index 89% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationDisplay.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationDisplay.cs index bad0c984361b..e208a861d07b 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationDisplay.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationDisplay.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; /// Localized display information for this particular operation. public partial class OperationDisplay : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplay, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplay, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal { /// Backing field for property. @@ -23,16 +23,16 @@ public partial class OperationDisplay : public string Description { get => this._description; } /// Internal Acessors for Description - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal.Description { get => this._description; set { {_description = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal.Description { get => this._description; set { {_description = value;} } } /// Internal Acessors for Operation - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } } /// Internal Acessors for Provider - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } } /// Internal Acessors for Resource - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplayInternal.Resource { get => this._resource; set { {_resource = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplayInternal.Resource { get => this._resource; set { {_resource = value;} } } /// Backing field for property. private string _operation; @@ -78,6 +78,9 @@ public partial interface IOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The short, localized friendly description of the operation; suitable for tool tips and detailed views.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -89,6 +92,9 @@ public partial interface IOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The concise, localized friendly name for the operation; suitable for dropdowns. E.g. ""Create or Update Virtual Machine"", ""Restart Virtual Machine"".", SerializedName = @"operation", PossibleTypes = new [] { typeof(string) })] @@ -99,6 +105,9 @@ public partial interface IOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The localized friendly form of the resource provider name, e.g. ""Microsoft Monitoring Insights"" or ""Microsoft Compute"".", SerializedName = @"provider", PossibleTypes = new [] { typeof(string) })] @@ -109,6 +118,9 @@ public partial interface IOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The localized friendly name of the resource type related to this operation. E.g. ""Virtual Machines"" or ""Job Schedule Collections"".", SerializedName = @"resource", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationDisplay.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationDisplay.json.cs similarity index 95% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationDisplay.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationDisplay.json.cs index c8fd81c1904c..6853b9d3ba99 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationDisplay.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationDisplay.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class OperationDisplay partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplay. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplay. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplay. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplay. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null; } @@ -77,10 +77,10 @@ internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWork { return; } - {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider;} - {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource;} - {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)_provider;} + {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)_resource;} + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)_operation;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} AfterFromJson(json); } @@ -103,19 +103,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json. { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationListResult.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationListResult.PowerShell.cs similarity index 76% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationListResult.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationListResult.PowerShell.cs index 85dd86bdc459..8b0210867717 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationListResult.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -66,29 +66,27 @@ public partial class OperationListResult 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.Monitor.MonitorWorkspace.Models.Api30.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationListResult(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.Monitor.MonitorWorkspace.Models.Api30.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationListResult(content); } @@ -98,10 +96,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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. @@ -116,17 +114,17 @@ internal OperationListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.OperationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.OperationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResultInternal)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. @@ -141,11 +139,11 @@ internal OperationListResult(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.OperationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.OperationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationListResult.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationListResult.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs index 91d1b7e1b623..e05fe976a0e5 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationListResult.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationListResult.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationListResult.cs similarity index 74% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationListResult.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationListResult.cs index 26ad0c5219e9..c15e925addf1 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationListResult.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationListResult.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -12,15 +12,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api /// results. /// public partial class OperationListResult : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationListResult, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResult, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperation[] Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationListResultInternal.Value { get => this._value; set { {_value = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -30,11 +30,11 @@ public partial class OperationListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperation[] _value; + private System.Collections.Generic.List _value; /// List of operations supported by the resource provider [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperation[] Value { get => this._value; } + public System.Collections.Generic.List Value { get => this._value; } /// Creates an new instance. public OperationListResult() @@ -51,6 +51,9 @@ public partial interface IOperationListResult : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"URL to get the next set of operation list results (if there are any).", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -59,10 +62,13 @@ public partial interface IOperationListResult : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"List of operations supported by the resource provider", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperation) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperation[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperation) })] + System.Collections.Generic.List Value { get; } } /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of @@ -73,7 +79,7 @@ internal partial interface IOperationListResultInternal /// URL to get the next set of operation list results (if there are any). string NextLink { get; set; } /// List of operations supported by the resource provider - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperation[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationListResult.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationListResult.json.cs similarity index 91% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationListResult.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationListResult.json.cs index bd4a04e54d07..3d7a64f2e050 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/OperationListResult.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/OperationListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -57,13 +57,13 @@ public partial class OperationListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new OperationListResult(json) : null; } @@ -80,8 +80,8 @@ internal OperationListResult(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorW { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.Operation.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Models.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Operation.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json. { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { @@ -116,7 +116,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json. container.Add("value",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpoint.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpoint.PowerShell.cs similarity index 84% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpoint.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpoint.PowerShell.cs index cdc0625d81dd..212ea164cac7 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpoint.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpoint.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class PrivateEndpoint 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.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateEndpoint(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.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateEndpoint(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpoint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpoint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,13 +111,13 @@ internal PrivateEndpoint(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointInternal)this).Id, 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. @@ -132,7 +132,7 @@ internal PrivateEndpoint(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointInternal)this).Id, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpoint.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpoint.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpoint.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpoint.TypeConverter.cs index f409700823ec..5af0c1ebb5ef 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpoint.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpoint.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpoint ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpoint ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpoint).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpoint).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpoint.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpoint.cs similarity index 90% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpoint.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpoint.cs index 8aceaf43bceb..fc44077074b6 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpoint.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpoint.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; /// The private endpoint resource. public partial class PrivateEndpoint : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpoint, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpoint, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointInternal { /// Backing field for property. @@ -21,7 +21,7 @@ public partial class PrivateEndpoint : public string Id { get => this._id; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointInternal.Id { get => this._id; set { {_id = value;} } } /// Creates an new instance. public PrivateEndpoint() @@ -37,6 +37,9 @@ public partial interface IPrivateEndpoint : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The ARM identifier for private endpoint.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpoint.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpoint.json.cs similarity index 95% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpoint.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpoint.json.cs index 623aec6880fc..e89a1182e229 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpoint.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpoint.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateEndpoint partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpoint. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpoint. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpoint. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpoint. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new PrivateEndpoint(json) : null; } @@ -77,7 +77,7 @@ internal PrivateEndpoint(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorks { return; } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } @@ -100,7 +100,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json. { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnection.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnection.PowerShell.cs new file mode 100644 index 000000000000..768cc7138233 --- /dev/null +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnection.PowerShell.cs @@ -0,0 +1,310 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; + + /// The private endpoint connection resource. + [System.ComponentModel.TypeConverter(typeof(PrivateEndpointConnectionTypeConverter))] + public partial class PrivateEndpointConnection + { + + /// + /// 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.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnection DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PrivateEndpointConnection(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.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PrivateEndpointConnection(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.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PrivateEndpointConnection(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.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointConnectionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointTypeConverter.ConvertFrom); + } + if (content.Contains("PrivateLinkServiceConnectionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateLinkServiceConnectionStateTypeConverter.ConvertFrom); + } + if (content.Contains("GroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).GroupId = (System.Collections.Generic.List) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).GroupId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpointId, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkServiceConnectionStateDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkServiceConnectionStateActionsRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateActionsRequired = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateActionsRequired",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateActionsRequired, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkServiceConnectionStateStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateStatus = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateStatus, 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 PrivateEndpointConnection(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.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointConnectionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointTypeConverter.ConvertFrom); + } + if (content.Contains("PrivateLinkServiceConnectionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateLinkServiceConnectionStateTypeConverter.ConvertFrom); + } + if (content.Contains("GroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).GroupId = (System.Collections.Generic.List) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).GroupId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpointId, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkServiceConnectionStateDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkServiceConnectionStateActionsRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateActionsRequired = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateActionsRequired",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateActionsRequired, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkServiceConnectionStateStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateStatus = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateStatus, 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.Monitor.MonitorWorkspace.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 private endpoint connection resource. + [System.ComponentModel.TypeConverter(typeof(PrivateEndpointConnectionTypeConverter))] + public partial interface IPrivateEndpointConnection + + { + + } +} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnection.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnection.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnection.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnection.TypeConverter.cs index 88be939ed65e..f141555f1b66 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnection.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnection.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnection ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnection).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnection.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnection.cs similarity index 52% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnection.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnection.cs index 5ad022f02dde..d9d98e82afe6 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnection.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnection.cs @@ -3,132 +3,150 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; /// The private endpoint connection resource. public partial class PrivateEndpointConnection : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnection, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Resource(); /// The group ids for the private endpoint resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string[] GroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)Property).GroupId; } + public System.Collections.Generic.List GroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)Property).GroupId; } /// /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).Id; } /// Internal Acessors for GroupId - string[] Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal.GroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)Property).GroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)Property).GroupId = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal.GroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)Property).GroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)Property).GroupId = value ?? null /* arrayOf */; } /// Internal Acessors for PrivateEndpoint - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint = value; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint = value ?? null /* model class */; } /// Internal Acessors for PrivateEndpointId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal.PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal.PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId = value ?? null; } /// Internal Acessors for PrivateLinkServiceConnectionState - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionState Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal.PrivateLinkServiceConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionState Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal.PrivateLinkServiceConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState = value ?? null /* model class */; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionProperties Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointConnectionProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionProperties Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointConnectionProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState = value ?? null; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).Name = value ?? null; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).Type = value ?? null; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).Name; } /// The ARM identifier for private endpoint. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId; } + public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId; } /// /// A message indicating if changes on the service provider require any updates on the consumer. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string PrivateLinkServiceConnectionStateActionsRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateActionsRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateActionsRequired = value ?? null; } + public string PrivateLinkServiceConnectionStateActionsRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateActionsRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateActionsRequired = value ?? null; } /// The reason for approval/rejection of the connection. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription = value ?? null; } + public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription = value ?? null; } /// /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus? PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus)""); } + public string PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionProperties _property; /// Resource properties. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointConnectionProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointConnectionProperties()); set => this._property = value; } /// The provisioning state of the private endpoint connection resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState; } + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState; } /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).SystemData; } + internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemData = value ?? null /* model class */; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemDataCreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemDataCreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemDataCreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)__resource).Type; } /// Creates an new instance. public PrivateEndpointConnection() @@ -151,20 +169,26 @@ public PrivateEndpointConnection() /// The private endpoint connection resource. public partial interface IPrivateEndpointConnection : Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResource + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResource { /// The group ids for the private endpoint resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The group ids for the private endpoint resource.", SerializedName = @"groupIds", PossibleTypes = new [] { typeof(string) })] - string[] GroupId { get; } + System.Collections.Generic.List GroupId { get; } /// The ARM identifier for private endpoint. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The ARM identifier for private endpoint.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -175,6 +199,9 @@ public partial interface IPrivateEndpointConnection : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A message indicating if changes on the service provider require any updates on the consumer.", SerializedName = @"actionsRequired", PossibleTypes = new [] { typeof(string) })] @@ -183,6 +210,9 @@ public partial interface IPrivateEndpointConnection : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The reason for approval/rejection of the connection.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -193,34 +223,42 @@ public partial interface IPrivateEndpointConnection : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus? PrivateLinkServiceConnectionStateStatus { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected")] + string PrivateLinkServiceConnectionStateStatus { get; set; } /// The provisioning state of the private endpoint connection resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The provisioning state of the private endpoint connection resource.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Succeeded", "Creating", "Deleting", "Failed")] + string ProvisioningState { get; } } /// The private endpoint connection resource. internal partial interface IPrivateEndpointConnectionInternal : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal { /// The group ids for the private endpoint resource. - string[] GroupId { get; set; } + System.Collections.Generic.List GroupId { get; set; } /// The private endpoint resource. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpoint PrivateEndpoint { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpoint PrivateEndpoint { get; set; } /// The ARM identifier for private endpoint. string PrivateEndpointId { get; set; } /// /// A collection of information about the state of the connection between service consumer and provider. /// - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } /// /// A message indicating if changes on the service provider require any updates on the consumer. /// @@ -230,11 +268,13 @@ internal partial interface IPrivateEndpointConnectionInternal : /// /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. /// - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus? PrivateLinkServiceConnectionStateStatus { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected")] + string PrivateLinkServiceConnectionStateStatus { get; set; } /// Resource properties. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionProperties Property { get; set; } /// The provisioning state of the private endpoint connection resource. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Succeeded", "Creating", "Deleting", "Failed")] + string ProvisioningState { get; set; } } } \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnection.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnection.json.cs similarity index 93% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnection.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnection.json.cs index 20124e558211..f4d960ab0e0d 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnection.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnection.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateEndpointConnection partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnection. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnection. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnection FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnection FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new PrivateEndpointConnection(json) : null; } @@ -77,8 +77,8 @@ internal PrivateEndpointConnection(Microsoft.Azure.PowerShell.Cmdlets.Monitor.Mo { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointConnectionProperties.FromJson(__jsonProperties) : Property;} + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointConnectionProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnectionProperties.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.PowerShell.cs similarity index 55% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnectionProperties.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.PowerShell.cs index e3f16afa85bc..9bd8af26d41e 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnectionProperties.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class PrivateEndpointConnectionProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateEndpointConnectionProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateEndpointConnectionProperties(content); } @@ -97,10 +97,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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. @@ -115,41 +115,41 @@ internal PrivateEndpointConnectionProperties(global::System.Collections.IDiction // actually deserialize if (content.Contains("PrivateEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointTypeConverter.ConvertFrom); } if (content.Contains("PrivateLinkServiceConnectionState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateLinkServiceConnectionStateTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateLinkServiceConnectionStateTypeConverter.ConvertFrom); } if (content.Contains("GroupId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).GroupId = (string[]) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).GroupId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).GroupId = (System.Collections.Generic.List) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).GroupId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PrivateEndpointId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateActionsRequired")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateActionsRequired = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateActionsRequired",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateActionsRequired, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateActionsRequired = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateActionsRequired",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateActionsRequired, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus?) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus, 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. @@ -164,35 +164,35 @@ internal PrivateEndpointConnectionProperties(global::System.Management.Automatio // actually deserialize if (content.Contains("PrivateEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpointTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpointTypeConverter.ConvertFrom); } if (content.Contains("PrivateLinkServiceConnectionState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateLinkServiceConnectionStateTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateLinkServiceConnectionStateTypeConverter.ConvertFrom); } if (content.Contains("GroupId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).GroupId = (string[]) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).GroupId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).GroupId = (System.Collections.Generic.List) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).GroupId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PrivateEndpointId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateActionsRequired")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateActionsRequired = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateActionsRequired",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateActionsRequired, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateActionsRequired = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateActionsRequired",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateActionsRequired, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus?) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnectionProperties.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnectionProperties.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.TypeConverter.cs index 15a627daf147..4ac2f5c52df7 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnectionProperties.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -108,14 +108,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnectionProperties.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.cs similarity index 61% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnectionProperties.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.cs index 6b2293d53423..47c326751b55 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnectionProperties.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.cs @@ -3,80 +3,80 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; /// Properties of the private endpoint connection. public partial class PrivateEndpointConnectionProperties : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionProperties, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionProperties, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal { /// Backing field for property. - private string[] _groupId; + private System.Collections.Generic.List _groupId; /// The group ids for the private endpoint resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - public string[] GroupId { get => this._groupId; } + public System.Collections.Generic.List GroupId { get => this._groupId; } /// Internal Acessors for GroupId - string[] Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal.GroupId { get => this._groupId; set { {_groupId = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal.GroupId { get => this._groupId; set { {_groupId = value;} } } /// Internal Acessors for PrivateEndpoint - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal.PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpoint()); set { {_privateEndpoint = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal.PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpoint()); set { {_privateEndpoint = value;} } } /// Internal Acessors for PrivateEndpointId - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal.PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointInternal)PrivateEndpoint).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointInternal)PrivateEndpoint).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal.PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointInternal)PrivateEndpoint).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointInternal)PrivateEndpoint).Id = value ?? null; } /// Internal Acessors for PrivateLinkServiceConnectionState - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionState Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal.PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateLinkServiceConnectionState()); set { {_privateLinkServiceConnectionState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionState Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal.PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateLinkServiceConnectionState()); set { {_privateLinkServiceConnectionState = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpoint _privateEndpoint; + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpoint _privateEndpoint; /// The private endpoint resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpoint PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpoint()); set => this._privateEndpoint = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpoint PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpoint()); set => this._privateEndpoint = value; } /// The ARM identifier for private endpoint. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointInternal)PrivateEndpoint).Id; } + public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointInternal)PrivateEndpoint).Id; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionState _privateLinkServiceConnectionState; + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionState _privateLinkServiceConnectionState; /// /// A collection of information about the state of the connection between service consumer and provider. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateLinkServiceConnectionState()); set => this._privateLinkServiceConnectionState = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateLinkServiceConnectionState()); set => this._privateLinkServiceConnectionState = value; } /// /// A message indicating if changes on the service provider require any updates on the consumer. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string PrivateLinkServiceConnectionStateActionsRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).ActionsRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).ActionsRequired = value ?? null; } + public string PrivateLinkServiceConnectionStateActionsRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).ActionsRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).ActionsRequired = value ?? null; } /// The reason for approval/rejection of the connection. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Description = value ?? null; } + public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Description = value ?? null; } /// /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus? PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus)""); } + public string PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Status = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState? _provisioningState; + private string _provisioningState; /// The provisioning state of the private endpoint connection resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState? ProvisioningState { get => this._provisioningState; } + public string ProvisioningState { get => this._provisioningState; } /// Creates an new instance. public PrivateEndpointConnectionProperties() @@ -92,14 +92,20 @@ public partial interface IPrivateEndpointConnectionProperties : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The group ids for the private endpoint resource.", SerializedName = @"groupIds", PossibleTypes = new [] { typeof(string) })] - string[] GroupId { get; } + System.Collections.Generic.List GroupId { get; } /// The ARM identifier for private endpoint. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The ARM identifier for private endpoint.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -110,6 +116,9 @@ public partial interface IPrivateEndpointConnectionProperties : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A message indicating if changes on the service provider require any updates on the consumer.", SerializedName = @"actionsRequired", PossibleTypes = new [] { typeof(string) })] @@ -118,6 +127,9 @@ public partial interface IPrivateEndpointConnectionProperties : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The reason for approval/rejection of the connection.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -128,18 +140,26 @@ public partial interface IPrivateEndpointConnectionProperties : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus? PrivateLinkServiceConnectionStateStatus { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected")] + string PrivateLinkServiceConnectionStateStatus { get; set; } /// The provisioning state of the private endpoint connection resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The provisioning state of the private endpoint connection resource.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Succeeded", "Creating", "Deleting", "Failed")] + string ProvisioningState { get; } } /// Properties of the private endpoint connection. @@ -147,15 +167,15 @@ internal partial interface IPrivateEndpointConnectionPropertiesInternal { /// The group ids for the private endpoint resource. - string[] GroupId { get; set; } + System.Collections.Generic.List GroupId { get; set; } /// The private endpoint resource. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpoint PrivateEndpoint { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpoint PrivateEndpoint { get; set; } /// The ARM identifier for private endpoint. string PrivateEndpointId { get; set; } /// /// A collection of information about the state of the connection between service consumer and provider. /// - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } /// /// A message indicating if changes on the service provider require any updates on the consumer. /// @@ -165,9 +185,11 @@ internal partial interface IPrivateEndpointConnectionPropertiesInternal /// /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. /// - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus? PrivateLinkServiceConnectionStateStatus { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected")] + string PrivateLinkServiceConnectionStateStatus { get; set; } /// The provisioning state of the private endpoint connection resource. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Succeeded", "Creating", "Deleting", "Failed")] + string ProvisioningState { get; set; } } } \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnectionProperties.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.json.cs similarity index 90% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnectionProperties.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.json.cs index b615f3c605fa..672365ce4f84 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateEndpointConnectionProperties.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateEndpointConnectionProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateEndpointConnectionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnectionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new PrivateEndpointConnectionProperties(json) : null; } @@ -77,10 +77,10 @@ internal PrivateEndpointConnectionProperties(Microsoft.Azure.PowerShell.Cmdlets. { return; } - {_privateEndpoint = If( json?.PropertyT("privateEndpoint"), out var __jsonPrivateEndpoint) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateEndpoint.FromJson(__jsonPrivateEndpoint) : PrivateEndpoint;} - {_privateLinkServiceConnectionState = If( json?.PropertyT("privateLinkServiceConnectionState"), out var __jsonPrivateLinkServiceConnectionState) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.PrivateLinkServiceConnectionState.FromJson(__jsonPrivateLinkServiceConnectionState) : PrivateLinkServiceConnectionState;} - {_groupId = If( json?.PropertyT("groupIds"), out var __jsonGroupIds) ? If( __jsonGroupIds as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : GroupId;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_privateEndpoint = If( json?.PropertyT("privateEndpoint"), out var __jsonPrivateEndpoint) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateEndpoint.FromJson(__jsonPrivateEndpoint) : _privateEndpoint;} + {_privateLinkServiceConnectionState = If( json?.PropertyT("privateLinkServiceConnectionState"), out var __jsonPrivateLinkServiceConnectionState) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.PrivateLinkServiceConnectionState.FromJson(__jsonPrivateLinkServiceConnectionState) : _privateLinkServiceConnectionState;} + {_groupId = If( json?.PropertyT("groupIds"), out var __jsonGroupIds) ? If( __jsonGroupIds as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _groupId;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} AfterFromJson(json); } @@ -106,7 +106,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json. } AddIf( null != this._privateEndpoint ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) this._privateEndpoint.ToJson(null,serializationMode) : null, "privateEndpoint" ,container.Add ); AddIf( null != this._privateLinkServiceConnectionState ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) this._privateLinkServiceConnectionState.ToJson(null,serializationMode) : null, "privateLinkServiceConnectionState" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { if (null != this._groupId) { @@ -118,7 +118,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json. container.Add("groupIds",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateLinkServiceConnectionState.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateLinkServiceConnectionState.PowerShell.cs similarity index 72% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateLinkServiceConnectionState.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateLinkServiceConnectionState.PowerShell.cs index 7297001db6a5..2aa96965e800 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateLinkServiceConnectionState.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateLinkServiceConnectionState.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -65,29 +65,29 @@ public partial class PrivateLinkServiceConnectionState partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionState DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionState DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateLinkServiceConnectionState(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionState DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionState DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateLinkServiceConnectionState(content); } @@ -99,10 +99,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionState FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionState FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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. @@ -117,21 +117,21 @@ internal PrivateLinkServiceConnectionState(global::System.Collections.IDictionar // actually deserialize if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionStateInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionStateInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionStateInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionStateInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionStateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionStateInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionStateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionStateInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("ActionsRequired")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionStateInternal)this).ActionsRequired = (string) content.GetValueForProperty("ActionsRequired",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionStateInternal)this).ActionsRequired, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionStateInternal)this).ActionsRequired = (string) content.GetValueForProperty("ActionsRequired",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionStateInternal)this).ActionsRequired, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -146,15 +146,15 @@ internal PrivateLinkServiceConnectionState(global::System.Management.Automation. // actually deserialize if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionStateInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionStateInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionStateInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionStateInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionStateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionStateInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionStateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionStateInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("ActionsRequired")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionStateInternal)this).ActionsRequired = (string) content.GetValueForProperty("ActionsRequired",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionStateInternal)this).ActionsRequired, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionStateInternal)this).ActionsRequired = (string) content.GetValueForProperty("ActionsRequired",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionStateInternal)this).ActionsRequired, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateLinkServiceConnectionState.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateLinkServiceConnectionState.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateLinkServiceConnectionState.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateLinkServiceConnectionState.TypeConverter.cs index 1562369ce53b..5823bd5f6165 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateLinkServiceConnectionState.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateLinkServiceConnectionState.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionState ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionState ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionState).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionState).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateLinkServiceConnectionState.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateLinkServiceConnectionState.cs similarity index 84% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateLinkServiceConnectionState.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateLinkServiceConnectionState.cs index d2c55ff521be..2370c66981cd 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateLinkServiceConnectionState.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateLinkServiceConnectionState.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api /// A collection of information about the state of the connection between service consumer and provider. /// public partial class PrivateLinkServiceConnectionState : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionState, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionStateInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionState, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionStateInternal { /// Backing field for property. @@ -32,13 +32,13 @@ public partial class PrivateLinkServiceConnectionState : public string Description { get => this._description; set => this._description = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus? _status; + private string _status; /// /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus? Status { get => this._status; set => this._status = value; } + public string Status { get => this._status; set => this._status = value; } /// Creates an new instance. public PrivateLinkServiceConnectionState() @@ -56,6 +56,9 @@ public partial interface IPrivateLinkServiceConnectionState : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A message indicating if changes on the service provider require any updates on the consumer.", SerializedName = @"actionsRequired", PossibleTypes = new [] { typeof(string) })] @@ -64,6 +67,9 @@ public partial interface IPrivateLinkServiceConnectionState : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The reason for approval/rejection of the connection.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -74,10 +80,14 @@ public partial interface IPrivateLinkServiceConnectionState : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus? Status { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected")] + string Status { get; set; } } /// A collection of information about the state of the connection between service consumer and provider. @@ -93,7 +103,8 @@ internal partial interface IPrivateLinkServiceConnectionStateInternal /// /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. /// - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus? Status { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected")] + string Status { get; set; } } } \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateLinkServiceConnectionState.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateLinkServiceConnectionState.json.cs similarity index 95% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateLinkServiceConnectionState.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateLinkServiceConnectionState.json.cs index 17148acd6066..532236de7532 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/PrivateLinkServiceConnectionState.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/PrivateLinkServiceConnectionState.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class PrivateLinkServiceConnectionState partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionState. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionState. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionState. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionState. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IPrivateLinkServiceConnectionState FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateLinkServiceConnectionState FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new PrivateLinkServiceConnectionState(json) : null; } @@ -79,9 +79,9 @@ internal PrivateLinkServiceConnectionState(Microsoft.Azure.PowerShell.Cmdlets.Mo { return; } - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - {_actionsRequired = If( json?.PropertyT("actionsRequired"), out var __jsonActionsRequired) ? (string)__jsonActionsRequired : (string)ActionsRequired;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + {_actionsRequired = If( json?.PropertyT("actionsRequired"), out var __jsonActionsRequired) ? (string)__jsonActionsRequired : (string)_actionsRequired;} AfterFromJson(json); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/Resource.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Resource.PowerShell.cs similarity index 57% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/Resource.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Resource.PowerShell.cs index 3b1644826468..f425a12970bf 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/Resource.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Resource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -65,27 +65,27 @@ public partial class Resource 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.Monitor.MonitorWorkspace.Models.Api40.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Resource(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.Monitor.MonitorWorkspace.Models.Api40.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Resource(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,49 +113,49 @@ internal Resource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("SystemData")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -170,43 +170,43 @@ internal Resource(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("SystemData")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/Resource.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Resource.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/Resource.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Resource.TypeConverter.cs index e7c4b53fbe64..2dc68082c7f0 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/Resource.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Resource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/Resource.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Resource.cs similarity index 63% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/Resource.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Resource.cs index 1136c393e2c1..0c5020666241 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/Resource.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Resource.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api /// Common fields that are returned in the response for all Azure Resource Manager resources /// public partial class Resource : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResource, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResource, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal { /// Backing field for property. @@ -25,16 +25,34 @@ public partial class Resource : public string Id { get => this._id; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _name; @@ -44,37 +62,37 @@ public partial class Resource : public string Name { get => this._name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData _systemData; /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).CreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).CreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).CreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).LastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).LastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).LastModifiedByType; } /// Backing field for property. private string _type; @@ -101,6 +119,9 @@ public partial interface IResource : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Fully qualified resource ID for the resource. E.g. ""/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}""", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -109,6 +130,9 @@ public partial interface IResource : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The name of the resource", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -116,57 +140,80 @@ public partial interface IResource : /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource last modification (UTC)", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of the resource. E.g. ""Microsoft.Compute/virtualMachines"" or ""Microsoft.Storage/storageAccounts""", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] @@ -186,19 +233,21 @@ internal partial interface IResourceInternal /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The timestamp of resource last modification (UTC) global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/Resource.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Resource.json.cs similarity index 93% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/Resource.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Resource.json.cs index 79b87f0a9fdd..79a89fcb06d4 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api40/Resource.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Resource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class Resource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api40.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new Resource(json) : null; } @@ -79,10 +79,10 @@ internal Resource(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Ru { return; } - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.SystemData.FromJson(__jsonSystemData) : SystemData;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } @@ -105,19 +105,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json. { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ResourceAutoGenerated.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ResourceAutoGenerated.PowerShell.cs similarity index 55% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ResourceAutoGenerated.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ResourceAutoGenerated.PowerShell.cs index ff05a9d829dc..b758a3cb908d 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ResourceAutoGenerated.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ResourceAutoGenerated.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -65,29 +65,27 @@ public partial class ResourceAutoGenerated 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.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ResourceAutoGenerated(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.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ResourceAutoGenerated(content); } @@ -97,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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. @@ -115,49 +113,49 @@ internal ResourceAutoGenerated(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("SystemData")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)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.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -172,43 +170,43 @@ internal ResourceAutoGenerated(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("SystemData")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)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.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ResourceAutoGenerated.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ResourceAutoGenerated.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ResourceAutoGenerated.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ResourceAutoGenerated.TypeConverter.cs index a546b7d1ff15..20060067a0db 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ResourceAutoGenerated.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ResourceAutoGenerated.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGenerated ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGenerated ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGenerated).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGenerated).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ResourceAutoGenerated.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ResourceAutoGenerated.cs similarity index 62% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ResourceAutoGenerated.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ResourceAutoGenerated.cs index 8f8d90bdfc02..5afc0cdedd6b 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ResourceAutoGenerated.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ResourceAutoGenerated.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api /// Common fields that are returned in the response for all Azure Resource Manager resources /// public partial class ResourceAutoGenerated : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGenerated, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGenerated, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal { /// Backing field for property. @@ -25,16 +25,34 @@ public partial class ResourceAutoGenerated : public string Id { get => this._id; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _name; @@ -44,37 +62,37 @@ public partial class ResourceAutoGenerated : public string Name { get => this._name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData _systemData; /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).CreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).CreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).CreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).LastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).LastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)SystemData).LastModifiedByType; } /// Backing field for property. private string _type; @@ -101,6 +119,9 @@ public partial interface IResourceAutoGenerated : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -109,6 +130,9 @@ public partial interface IResourceAutoGenerated : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The name of the resource", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -116,57 +140,80 @@ public partial interface IResourceAutoGenerated : /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource last modification (UTC)", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of the resource. E.g. ""Microsoft.Compute/virtualMachines"" or ""Microsoft.Storage/storageAccounts""", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] @@ -186,19 +233,21 @@ internal partial interface IResourceAutoGeneratedInternal /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The timestamp of resource last modification (UTC) global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ResourceAutoGenerated.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ResourceAutoGenerated.json.cs similarity index 93% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ResourceAutoGenerated.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ResourceAutoGenerated.json.cs index 20b76a014b10..217f7b09d3b7 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/ResourceAutoGenerated.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/ResourceAutoGenerated.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class ResourceAutoGenerated partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGenerated. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGenerated. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGenerated. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGenerated. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new ResourceAutoGenerated(json) : null; } @@ -79,10 +79,10 @@ internal ResourceAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.Monitor.Monito { return; } - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.SystemData.FromJson(__jsonSystemData) : SystemData;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } @@ -105,19 +105,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json. { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/SystemData.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/SystemData.PowerShell.cs similarity index 64% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/SystemData.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/SystemData.PowerShell.cs index a9f86c5f7b50..d9a1cac49da2 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/SystemData.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/SystemData.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class SystemData 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.Monitor.MonitorWorkspace.Models.Api30.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SystemData(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.Monitor.MonitorWorkspace.Models.Api30.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SystemData(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,33 +111,33 @@ internal SystemData(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("CreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); } if (content.Contains("CreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); } if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("LastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); } if (content.Contains("LastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); } if (content.Contains("LastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -152,27 +152,27 @@ internal SystemData(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("CreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); } if (content.Contains("CreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); } if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("LastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); } if (content.Contains("LastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); } if (content.Contains("LastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/SystemData.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/SystemData.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/SystemData.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/SystemData.TypeConverter.cs index a13145dcd5d7..451751294b25 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/SystemData.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/SystemData.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/SystemData.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/SystemData.cs similarity index 80% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/SystemData.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/SystemData.cs index 6ca642a8b3f1..4b2f84756638 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/SystemData.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/SystemData.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; /// Metadata pertaining to creation and last modification of the resource. public partial class SystemData : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemDataInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemDataInternal { /// Backing field for property. @@ -28,11 +28,11 @@ public partial class SystemData : public string CreatedBy { get => this._createdBy; set => this._createdBy = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? _createdByType; + private string _createdByType; /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? CreatedByType { get => this._createdByType; set => this._createdByType = value; } + public string CreatedByType { get => this._createdByType; set => this._createdByType = value; } /// Backing field for property. private global::System.DateTime? _lastModifiedAt; @@ -49,11 +49,11 @@ public partial class SystemData : public string LastModifiedBy { get => this._lastModifiedBy; set => this._lastModifiedBy = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? _lastModifiedByType; + private string _lastModifiedByType; /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } + public string LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } /// Creates an new instance. public SystemData() @@ -69,6 +69,9 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -77,6 +80,9 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] @@ -85,14 +91,21 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? CreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string CreatedByType { get; set; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The timestamp of resource last modification (UTC)", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -101,6 +114,9 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] @@ -109,10 +125,14 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? LastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string LastModifiedByType { get; set; } } /// Metadata pertaining to creation and last modification of the resource. @@ -124,13 +144,15 @@ internal partial interface ISystemDataInternal /// The identity that created the resource. string CreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? CreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string CreatedByType { get; set; } /// The timestamp of resource last modification (UTC) global::System.DateTime? LastModifiedAt { get; set; } /// The identity that last modified the resource. string LastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? LastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string LastModifiedByType { get; set; } } } \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/SystemData.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/SystemData.json.cs similarity index 94% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/SystemData.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/SystemData.json.cs index 3c3e2d5cf737..ddfada3425b2 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/SystemData.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/SystemData.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SystemData partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new SystemData(json) : null; } @@ -77,12 +77,12 @@ internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace. { return; } - {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy;} - {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType;} - {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} - {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy;} - {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType;} - {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : LastModifiedAt : LastModifiedAt;} + {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)_createdBy;} + {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)_createdByType;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : _createdAt : _createdAt;} + {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)_lastModifiedBy;} + {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)_lastModifiedByType;} + {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : _lastModifiedAt : _lastModifiedAt;} AfterFromJson(json); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResource.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResource.PowerShell.cs similarity index 53% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResource.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResource.PowerShell.cs index 833b102c4f18..aba3088f7253 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResource.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -65,27 +65,27 @@ public partial class TrackedResource 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.Monitor.MonitorWorkspace.Models.Api30.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TrackedResource(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.Monitor.MonitorWorkspace.Models.Api30.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TrackedResource(content); } @@ -95,7 +95,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -115,7 +115,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -130,57 +130,57 @@ internal TrackedResource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)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.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)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.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Type, 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. @@ -195,51 +195,51 @@ internal TrackedResource(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)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.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)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.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResource.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResource.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs index fbc11f2d3482..f603a4a389f9 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResource.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResource.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResource.cs similarity index 53% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResource.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResource.cs index e203527e10e7..fbed89f535c1 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResource.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResource.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -11,21 +11,21 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' /// public partial class TrackedResource : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResource, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResource, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceInternal, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGenerated __resourceAutoGenerated = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ResourceAutoGenerated(); + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGenerated __resourceAutoGenerated = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ResourceAutoGenerated(); /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id; } /// Backing field for property. private string _location; @@ -35,63 +35,81 @@ public partial class TrackedResource : public string Location { get => this._location; set => this._location = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name = value ?? null; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataLastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type = value ?? null; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name; } /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemData; } + internal Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemData = value ?? null /* model class */; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataCreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataCreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataCreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataLastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataLastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).SystemDataLastModifiedByType; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags _tag; + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags _tag; /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.TrackedResourceTags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.TrackedResourceTags()); set => this._tag = value; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Origin(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type; } /// Creates an new instance. public TrackedResource() @@ -114,12 +132,15 @@ public TrackedResource() /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' public partial interface ITrackedResource : Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGenerated + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGenerated { /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( - Required = true, + Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = false, Description = @"The geo-location where the resource lives", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] @@ -128,20 +149,23 @@ public partial interface ITrackedResource : [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags) })] - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags Tag { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags) })] + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags Tag { get; set; } } /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' internal partial interface ITrackedResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IResourceAutoGeneratedInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IResourceAutoGeneratedInternal { /// The geo-location where the resource lives string Location { get; set; } /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags Tag { get; set; } } } \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResource.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResource.json.cs similarity index 87% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResource.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResource.json.cs index 9448cf855223..b69484d67dfa 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResource.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class TrackedResource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new TrackedResource(json) : null; } @@ -88,7 +88,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json. } __resourceAutoGenerated?.ToJson(container, serializationMode); AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); - AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + } AfterToJson(ref container); return container; } @@ -105,9 +108,9 @@ internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorks { return; } - __resourceAutoGenerated = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ResourceAutoGenerated(json); - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.TrackedResourceTags.FromJson(__jsonTags) : Tag;} - {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} + __resourceAutoGenerated = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ResourceAutoGenerated(json); + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.TrackedResourceTags.FromJson(__jsonTags) : _tag;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} AfterFromJson(json); } } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResourceTags.PowerShell.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs similarity index 88% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResourceTags.PowerShell.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs index 509cf3fa7e8d..1fc05e27271f 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResourceTags.PowerShell.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class TrackedResourceTags 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.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TrackedResourceTags(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.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TrackedResourceTags(content); } @@ -95,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -115,7 +113,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -134,7 +132,7 @@ internal TrackedResourceTags(global::System.Collections.IDictionary content) } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResourceTags.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs similarity index 97% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResourceTags.TypeConverter.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs index 6941fc8335e0..900d3567dbc2 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResourceTags.TypeConverter.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResourceTags.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResourceTags.cs similarity index 92% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResourceTags.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResourceTags.cs index b36ddf3d309b..f77867868e19 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResourceTags.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResourceTags.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; /// Resource tags. public partial class TrackedResourceTags : - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTagsInternal + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTagsInternal { /// Creates an new instance. diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResourceTags.dictionary.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs similarity index 96% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResourceTags.dictionary.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs index 3975c10ded70..4f97beaee7a6 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResourceTags.dictionary.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.TrackedResourceTags source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.TrackedResourceTags source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResourceTags.json.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResourceTags.json.cs similarity index 96% rename from generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResourceTags.json.cs rename to generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResourceTags.json.cs index 0310099b54d0..fb53463bafcf 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/Api30/TrackedResourceTags.json.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Models/TrackedResourceTags.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TrackedResourceTags partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonObject json ? new TrackedResourceTags(json) : null; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/MonitorWorkspace.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/MonitorWorkspace.cs index ea59d5afd667..2809841a0e5b 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/MonitorWorkspace.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/MonitorWorkspace.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace public partial class MonitorWorkspace { - /// Create or update a workspace + /// create a workspace /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Azure Monitor workspace. The name is case insensitive @@ -25,10 +25,11 @@ public partial class MonitorWorkspace /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesCreate(string subscriptionId, string resourceGroupName, string azureMonitorWorkspaceName, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource 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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesCreate(string subscriptionId, string resourceGroupName, string azureMonitorWorkspaceName, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource 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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-04-03"; // Constant Parameters @@ -55,15 +56,15 @@ public partial class MonitorWorkspace await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.Monitor.MonitorWorkspace.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AzureMonitorWorkspacesCreate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + await this.AzureMonitorWorkspacesCreate_Call (request, onOk,onCreated,onDefault,eventListener,sender); } } - /// Create or update a workspace + /// create a workspace /// /// Properties that need to be specified to create a new workspace /// a delegate that is called when the remote service returns 200 (OK). @@ -72,10 +73,11 @@ public partial class MonitorWorkspace /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource 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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource 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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-04-03"; // Constant Parameters @@ -114,15 +116,282 @@ public partial class MonitorWorkspace await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.Monitor.MonitorWorkspace.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AzureMonitorWorkspacesCreate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + await this.AzureMonitorWorkspacesCreate_Call (request, onOk,onCreated,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// create a workspace + /// + /// Properties that need to be specified to create a new workspace + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesCreateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource body, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-04-03"; + // 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.Monitor/accounts/(?[^/]+)$", 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.Monitor/accounts/{azureMonitorWorkspaceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var azureMonitorWorkspaceName = _match.Groups["azureMonitorWorkspaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Monitor/accounts/" + + azureMonitorWorkspaceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AzureMonitorWorkspacesCreateWithResult_Call (request, eventListener,sender); + } + } + + /// create a workspace + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Azure Monitor workspace. The name is case insensitive + /// Json string supplied to the AzureMonitorWorkspacesCreate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// 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.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesCreateViaJsonString(string subscriptionId, string resourceGroupName, string azureMonitorWorkspaceName, 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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-04-03"; + // 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.Monitor/accounts/" + + global::System.Uri.EscapeDataString(azureMonitorWorkspaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AzureMonitorWorkspacesCreate_Call (request, onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// create a workspace + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Azure Monitor workspace. The name is case insensitive + /// Json string supplied to the AzureMonitorWorkspacesCreate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesCreateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string azureMonitorWorkspaceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-04-03"; + // 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.Monitor/accounts/" + + global::System.Uri.EscapeDataString(azureMonitorWorkspaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AzureMonitorWorkspacesCreateWithResult_Call (request, eventListener,sender); + } + } + + /// create a workspace + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Azure Monitor workspace. The name is case insensitive + /// Properties that need to be specified to create a new workspace + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesCreateWithResult(string subscriptionId, string resourceGroupName, string azureMonitorWorkspaceName, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource body, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-04-03"; + // 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.Monitor/accounts/" + + global::System.Uri.EscapeDataString(azureMonitorWorkspaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AzureMonitorWorkspacesCreateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesCreateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// 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 201 (Created). @@ -133,7 +402,7 @@ public partial class MonitorWorkspace /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AzureMonitorWorkspacesCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AzureMonitorWorkspacesCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -144,6 +413,7 @@ public partial class MonitorWorkspace await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -151,19 +421,19 @@ public partial class MonitorWorkspace case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } case global::System.Net.HttpStatusCode.Created: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -190,7 +460,7 @@ public partial class MonitorWorkspace /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AzureMonitorWorkspacesCreate_Validate(string subscriptionId, string resourceGroupName, string azureMonitorWorkspaceName, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource body, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task AzureMonitorWorkspacesCreate_Validate(string subscriptionId, string resourceGroupName, string azureMonitorWorkspaceName, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource body, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -200,7 +470,7 @@ public partial class MonitorWorkspace await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(azureMonitorWorkspaceName),azureMonitorWorkspaceName); - await eventListener.AssertRegEx(nameof(azureMonitorWorkspaceName),azureMonitorWorkspaceName,@"^(?!-)[a-zA-Z0-9-]+[^-]$"); + await eventListener.AssertRegEx(nameof(azureMonitorWorkspaceName), azureMonitorWorkspaceName, @"^(?!-)[a-zA-Z0-9-]+[^-]$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } @@ -211,6 +481,7 @@ public partial class MonitorWorkspace /// The name of the resource group. The name is case insensitive. /// The name of the Azure Monitor workspace. The name is case insensitive /// 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. @@ -218,7 +489,7 @@ public partial class MonitorWorkspace /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesDelete(string subscriptionId, string resourceGroupName, string azureMonitorWorkspaceName, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesDelete(string subscriptionId, string resourceGroupName, string azureMonitorWorkspaceName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) { var apiVersion = @"2023-04-03"; // Constant Parameters @@ -245,13 +516,14 @@ public partial class MonitorWorkspace await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AzureMonitorWorkspacesDelete_Call(request,onNoContent,onDefault,eventListener,sender); + await this.AzureMonitorWorkspacesDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); } } /// Delete a workspace /// /// 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. @@ -259,7 +531,7 @@ public partial class MonitorWorkspace /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesDeleteViaIdentity(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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) { var apiVersion = @"2023-04-03"; // Constant Parameters @@ -298,13 +570,14 @@ public partial class MonitorWorkspace await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AzureMonitorWorkspacesDelete_Call(request,onNoContent,onDefault,eventListener,sender); + await this.AzureMonitorWorkspacesDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 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. @@ -312,32 +585,29 @@ public partial class MonitorWorkspace /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AzureMonitorWorkspacesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AzureMonitorWorkspacesDelete_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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; // declared final-state-via: 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 ) { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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"))) { @@ -346,15 +616,14 @@ public partial class MonitorWorkspace if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { location = _response.GetFirstHeader(@"Location"); } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + 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.Monitor.MonitorWorkspace.Runtime.Method.Get); // and let's look at the current response body and see if we have some information we can give back to the listener var content = await _response.Content.ReadAsStringAsync(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } // drop the old response _response?.Dispose(); @@ -363,45 +632,45 @@ public partial class MonitorWorkspace _response = await sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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; + // 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.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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; - 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.Monitor.MonitorWorkspace.Runtime.UndeclaredResponseException(_response); - } - } + } + + 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.Monitor.MonitorWorkspace.Runtime.UndeclaredResponseException(_response); + } + } // check for terminal status code if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) @@ -420,10 +689,17 @@ public partial class MonitorWorkspace await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } case global::System.Net.HttpStatusCode.NoContent: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -433,7 +709,7 @@ public partial class MonitorWorkspace default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -469,7 +745,7 @@ public partial class MonitorWorkspace await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(azureMonitorWorkspaceName),azureMonitorWorkspaceName); - await eventListener.AssertRegEx(nameof(azureMonitorWorkspaceName),azureMonitorWorkspaceName,@"^(?!-)[a-zA-Z0-9-]+[^-]$"); + await eventListener.AssertRegEx(nameof(azureMonitorWorkspaceName), azureMonitorWorkspaceName, @"^(?!-)[a-zA-Z0-9-]+[^-]$"); } } @@ -485,7 +761,7 @@ public partial class MonitorWorkspace /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesGet(string subscriptionId, string resourceGroupName, string azureMonitorWorkspaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesGet(string subscriptionId, string resourceGroupName, string azureMonitorWorkspaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) { var apiVersion = @"2023-04-03"; // Constant Parameters @@ -512,7 +788,7 @@ public partial class MonitorWorkspace await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AzureMonitorWorkspacesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.AzureMonitorWorkspacesGet_Call (request, onOk,onDefault,eventListener,sender); } } @@ -526,7 +802,7 @@ public partial class MonitorWorkspace /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesGetViaIdentity(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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesGetViaIdentity(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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) { var apiVersion = @"2023-04-03"; // Constant Parameters @@ -565,45 +841,200 @@ public partial class MonitorWorkspace await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AzureMonitorWorkspacesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.AzureMonitorWorkspacesGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Returns the specific Azure Monitor workspace + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AzureMonitorWorkspacesGet_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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) { + var apiVersion = @"2023-04-03"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Monitor/accounts/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}'"); + } - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var azureMonitorWorkspaceName = _match.Groups["azureMonitorWorkspaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Monitor/accounts/" + + azureMonitorWorkspaceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AzureMonitorWorkspacesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Returns the specific Azure Monitor workspace + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Azure Monitor workspace. The name is case insensitive + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesGetWithResult(string subscriptionId, string resourceGroupName, string azureMonitorWorkspaceName, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-04-03"; + // 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.Monitor/accounts/" + + global::System.Uri.EscapeDataString(azureMonitorWorkspaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AzureMonitorWorkspacesGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesGet_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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -639,7 +1070,7 @@ public partial class MonitorWorkspace await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(azureMonitorWorkspaceName),azureMonitorWorkspaceName); - await eventListener.AssertRegEx(nameof(azureMonitorWorkspaceName),azureMonitorWorkspaceName,@"^(?!-)[a-zA-Z0-9-]+[^-]$"); + await eventListener.AssertRegEx(nameof(azureMonitorWorkspaceName), azureMonitorWorkspaceName, @"^(?!-)[a-zA-Z0-9-]+[^-]$"); } } @@ -654,7 +1085,7 @@ public partial class MonitorWorkspace /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesListByResourceGroup(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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesListByResourceGroup(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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) { var apiVersion = @"2023-04-03"; // Constant Parameters @@ -680,7 +1111,7 @@ public partial class MonitorWorkspace await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AzureMonitorWorkspacesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.AzureMonitorWorkspacesListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); } } @@ -694,7 +1125,7 @@ public partial class MonitorWorkspace /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesListByResourceGroupViaIdentity(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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesListByResourceGroupViaIdentity(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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) { var apiVersion = @"2023-04-03"; // Constant Parameters @@ -731,12 +1162,162 @@ public partial class MonitorWorkspace await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AzureMonitorWorkspacesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.AzureMonitorWorkspacesListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists all workspaces in the specified resource group + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-04-03"; + // 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.Monitor/accounts$", 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.Monitor/accounts'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Monitor/accounts" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AzureMonitorWorkspacesListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// Lists all workspaces in the specified resource group + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-04-03"; + // 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.Monitor/accounts" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AzureMonitorWorkspacesListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } /// - /// 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). @@ -747,7 +1328,7 @@ public partial class MonitorWorkspace /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AzureMonitorWorkspacesListByResourceGroup_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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AzureMonitorWorkspacesListByResourceGroup_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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -758,6 +1339,7 @@ public partial class MonitorWorkspace await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -765,13 +1347,13 @@ public partial class MonitorWorkspace case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -818,7 +1400,7 @@ public partial class MonitorWorkspace /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) { var apiVersion = @"2023-04-03"; // Constant Parameters @@ -842,7 +1424,7 @@ public partial class MonitorWorkspace await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AzureMonitorWorkspacesListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + await this.AzureMonitorWorkspacesListBySubscription_Call (request, onOk,onDefault,eventListener,sender); } } @@ -856,7 +1438,7 @@ public partial class MonitorWorkspace /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesListBySubscriptionViaIdentity(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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesListBySubscriptionViaIdentity(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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) { var apiVersion = @"2023-04-03"; // Constant Parameters @@ -890,33 +1472,178 @@ public partial class MonitorWorkspace await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AzureMonitorWorkspacesListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + await this.AzureMonitorWorkspacesListBySubscription_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Actual wire call for method. - /// - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Lists all workspaces in the specified subscription + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AzureMonitorWorkspacesListBySubscription_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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) { + var apiVersion = @"2023-04-03"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Monitor/accounts$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Monitor/accounts'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.Monitor/accounts" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AzureMonitorWorkspacesListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// Lists all workspaces in the specified subscription + /// The ID of the target subscription. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesListBySubscriptionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-04-03"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.Monitor/accounts" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AzureMonitorWorkspacesListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesListBySubscription_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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -924,13 +1651,13 @@ public partial class MonitorWorkspace case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -963,7 +1690,7 @@ public partial class MonitorWorkspace } } - /// Updates part of a workspace + /// update part of a workspace /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Azure Monitor workspace. The name is case insensitive @@ -973,10 +1700,11 @@ public partial class MonitorWorkspace /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesUpdate(string subscriptionId, string resourceGroupName, string azureMonitorWorkspaceName, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesUpdate(string subscriptionId, string resourceGroupName, string azureMonitorWorkspaceName, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-04-03"; // Constant Parameters @@ -1003,15 +1731,15 @@ public partial class MonitorWorkspace await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.Monitor.MonitorWorkspace.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AzureMonitorWorkspacesUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.AzureMonitorWorkspacesUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Updates part of a workspace + /// update part of a workspace /// /// The payload /// a delegate that is called when the remote service returns 200 (OK). @@ -1019,10 +1747,11 @@ public partial class MonitorWorkspace /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AzureMonitorWorkspacesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-04-03"; // Constant Parameters @@ -1061,15 +1790,275 @@ public partial class MonitorWorkspace await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.Monitor.MonitorWorkspace.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AzureMonitorWorkspacesUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.AzureMonitorWorkspacesUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// update part of a workspace + /// + /// The payload + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-04-03"; + // 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.Monitor/accounts/(?[^/]+)$", 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.Monitor/accounts/{azureMonitorWorkspaceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var azureMonitorWorkspaceName = _match.Groups["azureMonitorWorkspaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Monitor/accounts/" + + azureMonitorWorkspaceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AzureMonitorWorkspacesUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// update part of a workspace + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Azure Monitor workspace. The name is case insensitive + /// Json string supplied to the AzureMonitorWorkspacesUpdate 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.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesUpdateViaJsonString(string subscriptionId, string resourceGroupName, string azureMonitorWorkspaceName, 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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-04-03"; + // 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.Monitor/accounts/" + + global::System.Uri.EscapeDataString(azureMonitorWorkspaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AzureMonitorWorkspacesUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// update part of a workspace + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Azure Monitor workspace. The name is case insensitive + /// Json string supplied to the AzureMonitorWorkspacesUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string azureMonitorWorkspaceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-04-03"; + // 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.Monitor/accounts/" + + global::System.Uri.EscapeDataString(azureMonitorWorkspaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AzureMonitorWorkspacesUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// update part of a workspace + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Azure Monitor workspace. The name is case insensitive + /// The payload + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesUpdateWithResult(string subscriptionId, string resourceGroupName, string azureMonitorWorkspaceName, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-04-03"; + // 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.Monitor/accounts/" + + global::System.Uri.EscapeDataString(azureMonitorWorkspaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AzureMonitorWorkspacesUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 AzureMonitorWorkspacesUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 @@ -1079,7 +2068,7 @@ public partial class MonitorWorkspace /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AzureMonitorWorkspacesUpdate_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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AzureMonitorWorkspacesUpdate_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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1090,6 +2079,7 @@ public partial class MonitorWorkspace await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1097,13 +2087,13 @@ public partial class MonitorWorkspace case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1130,7 +2120,7 @@ public partial class MonitorWorkspace /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AzureMonitorWorkspacesUpdate_Validate(string subscriptionId, string resourceGroupName, string azureMonitorWorkspaceName, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task AzureMonitorWorkspacesUpdate_Validate(string subscriptionId, string resourceGroupName, string azureMonitorWorkspaceName, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1140,7 +2130,7 @@ public partial class MonitorWorkspace await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(azureMonitorWorkspaceName),azureMonitorWorkspaceName); - await eventListener.AssertRegEx(nameof(azureMonitorWorkspaceName),azureMonitorWorkspaceName,@"^(?!-)[a-zA-Z0-9-]+[^-]$"); + await eventListener.AssertRegEx(nameof(azureMonitorWorkspaceName), azureMonitorWorkspaceName, @"^(?!-)[a-zA-Z0-9-]+[^-]$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } @@ -1155,7 +2145,7 @@ public partial class MonitorWorkspace /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MonitorOperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MonitorOperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) { var apiVersion = @"2023-04-03"; // Constant Parameters @@ -1177,7 +2167,7 @@ public partial class MonitorWorkspace await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.MonitorOperationsList_Call(request,onOk,onDefault,eventListener,sender); + await this.MonitorOperationsList_Call (request, onOk,onDefault,eventListener,sender); } } @@ -1191,7 +2181,7 @@ public partial class MonitorWorkspace /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MonitorOperationsListViaIdentity(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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MonitorOperationsListViaIdentity(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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) { var apiVersion = @"2023-04-03"; // Constant Parameters @@ -1222,11 +2212,147 @@ public partial class MonitorWorkspace await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.MonitorOperationsList_Call(request,onOk,onDefault,eventListener,sender); + await this.MonitorOperationsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists available Operations for this Resource Provider + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 MonitorOperationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-04-03"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Monitor/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Monitor/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Monitor/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.MonitorOperationsListWithResult_Call (request, eventListener,sender); + } + } + + /// Lists available Operations for this Resource Provider + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 MonitorOperationsListWithResult(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-04-03"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Monitor/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.MonitorOperationsListWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 MonitorOperationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 @@ -1236,7 +2362,7 @@ public partial class MonitorWorkspace /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MonitorOperationsList_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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MonitorOperationsList_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.Monitor.MonitorWorkspace.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1247,6 +2373,7 @@ public partial class MonitorWorkspace await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1254,13 +2381,13 @@ public partial class MonitorWorkspace case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/ActionType.Completer.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/ActionType.Completer.cs deleted file mode 100644 index cbcfb7be8c4d..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/ActionType.Completer.cs +++ /dev/null @@ -1,37 +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.Monitor.MonitorWorkspace.Support -{ - - /// - /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ActionTypeTypeConverter))] - public partial struct ActionType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Internal".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Internal'", "Internal", global::System.Management.Automation.CompletionResultType.ParameterValue, "Internal"); - } - } - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/ActionType.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/ActionType.TypeConverter.cs deleted file mode 100644 index 76771c344285..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/ActionType.TypeConverter.cs +++ /dev/null @@ -1,61 +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.Monitor.MonitorWorkspace.Support -{ - - /// - /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - /// - public partial class ActionTypeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ActionType.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/ActionType.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/ActionType.cs deleted file mode 100644 index 7a9b4b18dd63..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/ActionType.cs +++ /dev/null @@ -1,98 +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.Monitor.MonitorWorkspace.Support -{ - - /// - /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - /// - public partial struct ActionType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ActionType Internal = @"Internal"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private ActionType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to ActionType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ActionType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ActionType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ActionType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ActionType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is ActionType && Equals((ActionType)obj); - } - - /// Returns hashCode for enum ActionType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for ActionType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ActionType - /// the value to convert to an instance of . - - public static implicit operator ActionType(string value) - { - return new ActionType(value); - } - - /// Implicit operator to convert ActionType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ActionType e) - { - return e._value; - } - - /// Overriding != operator for enum ActionType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ActionType e1, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ActionType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ActionType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ActionType e1, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ActionType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/CreatedByType.Completer.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/CreatedByType.Completer.cs deleted file mode 100644 index f47e31a4a0e2..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/CreatedByType.Completer.cs +++ /dev/null @@ -1,47 +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.Monitor.MonitorWorkspace.Support -{ - - /// The type of identity that created the resource. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByTypeTypeConverter))] - public partial struct CreatedByType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "User".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'User'", "User", global::System.Management.Automation.CompletionResultType.ParameterValue, "User"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Application".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Application'", "Application", global::System.Management.Automation.CompletionResultType.ParameterValue, "Application"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "ManagedIdentity".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'ManagedIdentity'", "ManagedIdentity", global::System.Management.Automation.CompletionResultType.ParameterValue, "ManagedIdentity"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Key".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Key'", "Key", global::System.Management.Automation.CompletionResultType.ParameterValue, "Key"); - } - } - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs deleted file mode 100644 index 5c929a544362..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs +++ /dev/null @@ -1,59 +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.Monitor.MonitorWorkspace.Support -{ - - /// The type of identity that created the resource. - public partial class CreatedByTypeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CreatedByType.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/CreatedByType.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/CreatedByType.cs deleted file mode 100644 index 0cdd0d65118a..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/CreatedByType.cs +++ /dev/null @@ -1,102 +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.Monitor.MonitorWorkspace.Support -{ - - /// The type of identity that created the resource. - public partial struct CreatedByType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType Application = @"Application"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType Key = @"Key"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType ManagedIdentity = @"ManagedIdentity"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType User = @"User"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to CreatedByType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new CreatedByType(global::System.Convert.ToString(value)); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private CreatedByType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Compares values of enum type CreatedByType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type CreatedByType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is CreatedByType && Equals((CreatedByType)obj); - } - - /// Returns hashCode for enum CreatedByType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for CreatedByType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to CreatedByType - /// the value to convert to an instance of . - - public static implicit operator CreatedByType(string value) - { - return new CreatedByType(value); - } - - /// Implicit operator to convert CreatedByType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType e) - { - return e._value; - } - - /// Overriding != operator for enum CreatedByType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum CreatedByType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.CreatedByType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/Origin.Completer.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/Origin.Completer.cs deleted file mode 100644 index b0f523d926e6..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/Origin.Completer.cs +++ /dev/null @@ -1,46 +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.Monitor.MonitorWorkspace.Support -{ - - /// - /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is - /// "user,system" - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.OriginTypeConverter))] - public partial struct Origin : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "user".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'user'", "user", global::System.Management.Automation.CompletionResultType.ParameterValue, "user"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "system".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'system'", "system", global::System.Management.Automation.CompletionResultType.ParameterValue, "system"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "user,system".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'user,system'", "user,system", global::System.Management.Automation.CompletionResultType.ParameterValue, "user,system"); - } - } - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/Origin.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/Origin.TypeConverter.cs deleted file mode 100644 index 27a212cbb2d3..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/Origin.TypeConverter.cs +++ /dev/null @@ -1,62 +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.Monitor.MonitorWorkspace.Support -{ - - /// - /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is - /// "user,system" - /// - public partial class OriginTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => Origin.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/Origin.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/Origin.cs deleted file mode 100644 index e4fff242ddda..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/Origin.cs +++ /dev/null @@ -1,103 +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.Monitor.MonitorWorkspace.Support -{ - - /// - /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is - /// "user,system" - /// - public partial struct Origin : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.Origin System = @"system"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.Origin User = @"user"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.Origin UserSystem = @"user,system"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to Origin - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new Origin(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type Origin - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.Origin e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type Origin (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is Origin && Equals((Origin)obj); - } - - /// Returns hashCode for enum Origin - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private Origin(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for Origin - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to Origin - /// the value to convert to an instance of . - - public static implicit operator Origin(string value) - { - return new Origin(value); - } - - /// Implicit operator to convert Origin to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.Origin e) - { - return e._value; - } - - /// Overriding != operator for enum Origin - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.Origin e1, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.Origin e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum Origin - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.Origin e1, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.Origin e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.Completer.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.Completer.cs deleted file mode 100644 index c4920806b3c8..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.Completer.cs +++ /dev/null @@ -1,47 +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.Monitor.MonitorWorkspace.Support -{ - - /// The current provisioning state. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningStateTypeConverter))] - public partial struct PrivateEndpointConnectionProvisioningState : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); - } - } - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.TypeConverter.cs deleted file mode 100644 index 34ff38fa1f67..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.TypeConverter.cs +++ /dev/null @@ -1,59 +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.Monitor.MonitorWorkspace.Support -{ - - /// The current provisioning state. - public partial class PrivateEndpointConnectionProvisioningStateTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => PrivateEndpointConnectionProvisioningState.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.cs deleted file mode 100644 index 598003e9e509..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.cs +++ /dev/null @@ -1,112 +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.Monitor.MonitorWorkspace.Support -{ - - /// The current provisioning state. - public partial struct PrivateEndpointConnectionProvisioningState : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState Creating = @"Creating"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState Deleting = @"Deleting"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState Failed = @"Failed"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState Succeeded = @"Succeeded"; - - /// - /// the value for an instance of the Enum. - /// - private string _value { get; set; } - - /// Conversion from arbitrary object to PrivateEndpointConnectionProvisioningState - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new PrivateEndpointConnectionProvisioningState(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type PrivateEndpointConnectionProvisioningState - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState e) - { - return _value.Equals(e._value); - } - - /// - /// Compares values of enum type PrivateEndpointConnectionProvisioningState (override for Object) - /// - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is PrivateEndpointConnectionProvisioningState && Equals((PrivateEndpointConnectionProvisioningState)obj); - } - - /// Returns hashCode for enum PrivateEndpointConnectionProvisioningState - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// - /// Creates an instance of the Enum class. - /// - /// the value to create an instance for. - private PrivateEndpointConnectionProvisioningState(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for PrivateEndpointConnectionProvisioningState - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// - /// Implicit operator to convert string to PrivateEndpointConnectionProvisioningState - /// - /// the value to convert to an instance of . - - public static implicit operator PrivateEndpointConnectionProvisioningState(string value) - { - return new PrivateEndpointConnectionProvisioningState(value); - } - - /// - /// Implicit operator to convert PrivateEndpointConnectionProvisioningState to string - /// - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState e) - { - return e._value; - } - - /// Overriding != operator for enum PrivateEndpointConnectionProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum PrivateEndpointConnectionProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointConnectionProvisioningState e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PrivateEndpointServiceConnectionStatus.Completer.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PrivateEndpointServiceConnectionStatus.Completer.cs deleted file mode 100644 index 3c0e4ae7ee4c..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PrivateEndpointServiceConnectionStatus.Completer.cs +++ /dev/null @@ -1,43 +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.Monitor.MonitorWorkspace.Support -{ - - /// The private endpoint connection status. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatusTypeConverter))] - public partial struct PrivateEndpointServiceConnectionStatus : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Pending".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Pending'", "Pending", global::System.Management.Automation.CompletionResultType.ParameterValue, "Pending"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Approved".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Approved'", "Approved", global::System.Management.Automation.CompletionResultType.ParameterValue, "Approved"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Rejected".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Rejected'", "Rejected", global::System.Management.Automation.CompletionResultType.ParameterValue, "Rejected"); - } - } - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PrivateEndpointServiceConnectionStatus.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PrivateEndpointServiceConnectionStatus.TypeConverter.cs deleted file mode 100644 index a9fc9ee84f16..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PrivateEndpointServiceConnectionStatus.TypeConverter.cs +++ /dev/null @@ -1,59 +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.Monitor.MonitorWorkspace.Support -{ - - /// The private endpoint connection status. - public partial class PrivateEndpointServiceConnectionStatusTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => PrivateEndpointServiceConnectionStatus.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PrivateEndpointServiceConnectionStatus.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PrivateEndpointServiceConnectionStatus.cs deleted file mode 100644 index cfddb5bba01a..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PrivateEndpointServiceConnectionStatus.cs +++ /dev/null @@ -1,106 +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.Monitor.MonitorWorkspace.Support -{ - - /// The private endpoint connection status. - public partial struct PrivateEndpointServiceConnectionStatus : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus Approved = @"Approved"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus Pending = @"Pending"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus Rejected = @"Rejected"; - - /// - /// the value for an instance of the Enum. - /// - private string _value { get; set; } - - /// Conversion from arbitrary object to PrivateEndpointServiceConnectionStatus - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new PrivateEndpointServiceConnectionStatus(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type PrivateEndpointServiceConnectionStatus - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus e) - { - return _value.Equals(e._value); - } - - /// - /// Compares values of enum type PrivateEndpointServiceConnectionStatus (override for Object) - /// - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is PrivateEndpointServiceConnectionStatus && Equals((PrivateEndpointServiceConnectionStatus)obj); - } - - /// Returns hashCode for enum PrivateEndpointServiceConnectionStatus - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// - /// Creates an instance of the Enum class. - /// - /// the value to create an instance for. - private PrivateEndpointServiceConnectionStatus(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for PrivateEndpointServiceConnectionStatus - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to PrivateEndpointServiceConnectionStatus - /// the value to convert to an instance of . - - public static implicit operator PrivateEndpointServiceConnectionStatus(string value) - { - return new PrivateEndpointServiceConnectionStatus(value); - } - - /// Implicit operator to convert PrivateEndpointServiceConnectionStatus to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus e) - { - return e._value; - } - - /// Overriding != operator for enum PrivateEndpointServiceConnectionStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus e1, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum PrivateEndpointServiceConnectionStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus e1, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PrivateEndpointServiceConnectionStatus e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/ProvisioningState.Completer.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/ProvisioningState.Completer.cs deleted file mode 100644 index 7171e078729e..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/ProvisioningState.Completer.cs +++ /dev/null @@ -1,53 +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.Monitor.MonitorWorkspace.Support -{ - - /// - /// The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy. - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningStateTypeConverter))] - public partial struct ProvisioningState : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled"); - } - } - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs deleted file mode 100644 index e6c8674f0451..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs +++ /dev/null @@ -1,61 +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.Monitor.MonitorWorkspace.Support -{ - - /// - /// The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy. - /// - public partial class ProvisioningStateTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ProvisioningState.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/ProvisioningState.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/ProvisioningState.cs deleted file mode 100644 index e134e87a3ee8..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/ProvisioningState.cs +++ /dev/null @@ -1,106 +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.Monitor.MonitorWorkspace.Support -{ - - /// - /// The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy. - /// - public partial struct ProvisioningState : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState Canceled = @"Canceled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState Creating = @"Creating"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState Deleting = @"Deleting"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState Failed = @"Failed"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState Succeeded = @"Succeeded"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to ProvisioningState - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ProvisioningState(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ProvisioningState - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ProvisioningState (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is ProvisioningState && Equals((ProvisioningState)obj); - } - - /// Returns hashCode for enum ProvisioningState - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private ProvisioningState(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for ProvisioningState - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ProvisioningState - /// the value to convert to an instance of . - - public static implicit operator ProvisioningState(string value) - { - return new ProvisioningState(value); - } - - /// Implicit operator to convert ProvisioningState to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState e) - { - return e._value; - } - - /// Overriding != operator for enum ProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PublicNetworkAccess.Completer.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PublicNetworkAccess.Completer.cs deleted file mode 100644 index fea6377ee7e5..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PublicNetworkAccess.Completer.cs +++ /dev/null @@ -1,39 +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.Monitor.MonitorWorkspace.Support -{ - - /// Gets or sets allow or disallow public network access to workspace - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccessTypeConverter))] - public partial struct PublicNetworkAccess : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); - } - } - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PublicNetworkAccess.TypeConverter.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PublicNetworkAccess.TypeConverter.cs deleted file mode 100644 index 16d3df3863fe..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PublicNetworkAccess.TypeConverter.cs +++ /dev/null @@ -1,59 +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.Monitor.MonitorWorkspace.Support -{ - - /// Gets or sets allow or disallow public network access to workspace - public partial class PublicNetworkAccessTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => PublicNetworkAccess.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PublicNetworkAccess.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PublicNetworkAccess.cs deleted file mode 100644 index c7513f699c0d..000000000000 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/api/Support/PublicNetworkAccess.cs +++ /dev/null @@ -1,98 +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.Monitor.MonitorWorkspace.Support -{ - - /// Gets or sets allow or disallow public network access to workspace - public partial struct PublicNetworkAccess : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess Disabled = @"Disabled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess Enabled = @"Enabled"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to PublicNetworkAccess - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new PublicNetworkAccess(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type PublicNetworkAccess - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type PublicNetworkAccess (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is PublicNetworkAccess && Equals((PublicNetworkAccess)obj); - } - - /// Returns hashCode for enum PublicNetworkAccess - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private PublicNetworkAccess(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for PublicNetworkAccess - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to PublicNetworkAccess - /// the value to convert to an instance of . - - public static implicit operator PublicNetworkAccess(string value) - { - return new PublicNetworkAccess(value); - } - - /// Implicit operator to convert PublicNetworkAccess to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess e) - { - return e._value; - } - - /// Overriding != operator for enum PublicNetworkAccess - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess e1, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum PublicNetworkAccess - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess e1, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/GetAzMonitorWorkspace_Get.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/GetAzMonitorWorkspace_Get.cs index deed04420005..f89b74e8b2de 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/GetAzMonitorWorkspace_Get.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/GetAzMonitorWorkspace_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Cmdlets; using System; /// Returns the specific Azure Monitor workspace @@ -13,13 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMonitorWorkspace_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties=new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties=new string[] {"PrivateEndpointConnection","ProvisioningState"}, ChangeDescription="The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource))] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState" } , ChangeDescription = "The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Description(@"Returns the specific Azure Monitor workspace")] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}", ApiVersion = "2023-04-03")] public partial class GetAzMonitorWorkspace_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class GetAzMonitorWorkspace_Get : global::System.Management.Autom /// 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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.MonitorWorkspace Client => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class GetAzMonitorWorkspace_Get : global::System.Management.Autom [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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] @@ -94,7 +115,7 @@ public partial class GetAzMonitorWorkspace_Get : global::System.Management.Autom /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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")] @@ -140,7 +161,8 @@ public partial class GetAzMonitorWorkspace_Get : global::System.Management.Autom [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -149,24 +171,24 @@ public partial class GetAzMonitorWorkspace_Get : global::System.Management.Autom /// 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.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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); + 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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource /// 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) @@ -189,6 +211,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -210,7 +237,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzMonitorWorkspace_Get() { @@ -261,8 +288,33 @@ public GetAzMonitorWorkspace_Get() 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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -315,7 +367,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -336,7 +388,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -374,12 +426,12 @@ protected override void StopProcessing() /// 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.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -396,15 +448,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + 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 } }); @@ -414,12 +466,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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource /// 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 ) { @@ -431,8 +483,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + 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; + } + } } } } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/GetAzMonitorWorkspace_GetViaIdentity.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/GetAzMonitorWorkspace_GetViaIdentity.cs index 1c9744be4fa4..c40d545cb626 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/GetAzMonitorWorkspace_GetViaIdentity.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/GetAzMonitorWorkspace_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Cmdlets; using System; /// Returns the specific Azure Monitor workspace @@ -13,13 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMonitorWorkspace_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties=new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties=new string[] {"PrivateEndpointConnection","ProvisioningState"}, ChangeDescription="The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource))] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState" } , ChangeDescription = "The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Description(@"Returns the specific Azure Monitor workspace")] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}", ApiVersion = "2023-04-03")] public partial class GetAzMonitorWorkspace_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class GetAzMonitorWorkspace_GetViaIdentity : global::System.Manag /// 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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.MonitorWorkspace Client => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class GetAzMonitorWorkspace_GetViaIdentity : global::System.Manag [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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] @@ -87,7 +108,7 @@ public partial class GetAzMonitorWorkspace_GetViaIdentity : global::System.Manag /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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")] @@ -110,24 +131,24 @@ public partial class GetAzMonitorWorkspace_GetViaIdentity : global::System.Manag /// 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.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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); + 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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource /// 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) @@ -150,6 +171,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -171,7 +197,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzMonitorWorkspace_GetViaIdentity() { @@ -222,8 +248,33 @@ public GetAzMonitorWorkspace_GetViaIdentity() 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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -276,7 +327,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -314,7 +365,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -352,12 +403,12 @@ protected override void StopProcessing() /// 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.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -374,7 +425,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 } @@ -392,12 +443,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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource /// 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 ) { @@ -409,8 +460,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + 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; + } + } } } } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/GetAzMonitorWorkspace_List.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/GetAzMonitorWorkspace_List.cs index 9cc2547929b6..840c4a37ee62 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/GetAzMonitorWorkspace_List.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/GetAzMonitorWorkspace_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Cmdlets; using System; /// Lists all workspaces in the specified resource group @@ -13,13 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMonitorWorkspace_List")] - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties=new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties=new string[] {"PrivateEndpointConnection","ProvisioningState"}, ChangeDescription="The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource))] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState" } , ChangeDescription = "The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Description(@"Lists all workspaces in the specified resource group")] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts", ApiVersion = "2023-04-03")] public partial class GetAzMonitorWorkspace_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,17 +38,32 @@ public partial class GetAzMonitorWorkspace_List : global::System.Management.Auto /// 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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.MonitorWorkspace Client => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.ClientAPI; @@ -59,6 +77,9 @@ public partial class GetAzMonitorWorkspace_List : global::System.Management.Auto [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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] @@ -85,7 +106,7 @@ public partial class GetAzMonitorWorkspace_List : global::System.Management.Auto /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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")] @@ -131,7 +152,8 @@ public partial class GetAzMonitorWorkspace_List : global::System.Management.Auto [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -140,24 +162,24 @@ public partial class GetAzMonitorWorkspace_List : global::System.Management.Auto /// 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.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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); + 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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResult /// 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) @@ -180,6 +202,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -201,7 +228,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzMonitorWorkspace_List() { @@ -252,8 +279,33 @@ public GetAzMonitorWorkspace_List() 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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -306,7 +358,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -327,7 +379,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -365,12 +417,12 @@ protected override void StopProcessing() /// 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.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -387,15 +439,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + 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 } }); @@ -405,12 +457,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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResult /// 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 ) { @@ -422,15 +474,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + 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 (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/GetAzMonitorWorkspace_List1.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/GetAzMonitorWorkspace_List1.cs index 13dffccae37d..9955ba4c4876 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/GetAzMonitorWorkspace_List1.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/GetAzMonitorWorkspace_List1.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Cmdlets; using System; /// Lists all workspaces in the specified subscription @@ -13,13 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.Monitor/accounts" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMonitorWorkspace_List1")] - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties=new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties=new string[] {"PrivateEndpointConnection","ProvisioningState"}, ChangeDescription="The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource))] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState" } , ChangeDescription = "The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Description(@"Lists all workspaces in the specified subscription")] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Monitor/accounts", ApiVersion = "2023-04-03")] public partial class GetAzMonitorWorkspace_List1 : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,17 +38,32 @@ public partial class GetAzMonitorWorkspace_List1 : global::System.Management.Aut /// 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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.MonitorWorkspace Client => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.ClientAPI; @@ -59,6 +77,9 @@ public partial class GetAzMonitorWorkspace_List1 : global::System.Management.Aut [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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] @@ -85,7 +106,7 @@ public partial class GetAzMonitorWorkspace_List1 : global::System.Management.Aut /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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")] @@ -117,7 +138,8 @@ public partial class GetAzMonitorWorkspace_List1 : global::System.Management.Aut [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -126,24 +148,24 @@ public partial class GetAzMonitorWorkspace_List1 : global::System.Management.Aut /// 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.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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); + 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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResult /// 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) @@ -166,6 +188,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -187,7 +214,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzMonitorWorkspace_List1() { @@ -238,8 +265,33 @@ public GetAzMonitorWorkspace_List1() 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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -292,7 +344,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -313,7 +365,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -351,12 +403,12 @@ protected override void StopProcessing() /// 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.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -373,15 +425,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 { SubscriptionId=SubscriptionId }) + 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 } }); @@ -391,12 +443,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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResult /// 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 ) { @@ -408,15 +460,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + 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 (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/NewAzMonitorWorkspace_CreateExpanded.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/NewAzMonitorWorkspace_CreateExpanded.cs index 26fbe519e9d6..99cda41c6318 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/NewAzMonitorWorkspace_CreateExpanded.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/NewAzMonitorWorkspace_CreateExpanded.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Cmdlets; using System; - /// Create or update a workspace + /// create a workspace /// /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMonitorWorkspace_CreateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties=new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties=new string[] {"PrivateEndpointConnection","ProvisioningState"}, ChangeDescription="The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Description(@"Create or update a workspace")] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState" } , ChangeDescription = "The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Description(@"create a workspace")] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}", ApiVersion = "2023-04-03")] public partial class NewAzMonitorWorkspace_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -31,18 +34,33 @@ public partial class NewAzMonitorWorkspace_CreateExpanded : global::System.Manag private string __processRecordId; /// An Azure Monitor Workspace definition - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource _azureMonitorWorkspacePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResource(); + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource _azureMonitorWorkspacePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResource(); /// /// 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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.MonitorWorkspace Client => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.ClientAPI; @@ -56,6 +74,9 @@ public partial class NewAzMonitorWorkspace_CreateExpanded : global::System.Manag [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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] @@ -108,7 +129,7 @@ public partial class NewAzMonitorWorkspace_CreateExpanded : global::System.Manag /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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")] @@ -154,7 +175,8 @@ public partial class NewAzMonitorWorkspace_CreateExpanded : global::System.Manag [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -167,44 +189,44 @@ public partial class NewAzMonitorWorkspace_CreateExpanded : global::System.Manag ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags Tag { get => _azureMonitorWorkspacePropertiesBody.Tag ?? null /* object */; set => _azureMonitorWorkspacePropertiesBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags Tag { get => _azureMonitorWorkspacePropertiesBody.Tag ?? null /* object */; set => _azureMonitorWorkspacePropertiesBody.Tag = value; } /// /// overrideOnCreated will be called before the regular onCreated 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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// 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.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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); + 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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource /// 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) @@ -227,6 +249,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -291,8 +318,33 @@ protected override void EndProcessing() 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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -302,7 +354,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzMonitorWorkspace_CreateExpanded() { @@ -356,7 +408,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -369,12 +421,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.AzureMonitorWorkspacesCreate(SubscriptionId, ResourceGroupName, Name, _azureMonitorWorkspacePropertiesBody, onOk, onCreated, onDefault, this, Pipeline); + await this.Client.AzureMonitorWorkspacesCreate(SubscriptionId, ResourceGroupName, Name, _azureMonitorWorkspacePropertiesBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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,Name=Name,body=_azureMonitorWorkspacePropertiesBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -410,12 +462,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,8 +479,26 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + 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; + } + } } } @@ -436,12 +506,12 @@ protected override void StopProcessing() /// 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.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -458,15 +528,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_azureMonitorWorkspacePropertiesBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_azureMonitorWorkspacePropertiesBody }) + 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 } }); @@ -476,12 +546,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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource /// 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 ) { @@ -493,8 +563,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + 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; + } + } } } } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/NewAzMonitorWorkspace_CreateViaIdentityExpanded.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/NewAzMonitorWorkspace_CreateViaIdentityExpanded.cs index e394df108091..39059dc04626 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/NewAzMonitorWorkspace_CreateViaIdentityExpanded.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/NewAzMonitorWorkspace_CreateViaIdentityExpanded.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Cmdlets; using System; - /// Create or update a workspace + /// create a workspace /// /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMonitorWorkspace_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties=new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties=new string[] {"PrivateEndpointConnection","ProvisioningState"}, ChangeDescription="The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Description(@"Create or update a workspace")] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState" } , ChangeDescription = "The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Description(@"create a workspace")] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}", ApiVersion = "2023-04-03")] public partial class NewAzMonitorWorkspace_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -31,18 +34,33 @@ public partial class NewAzMonitorWorkspace_CreateViaIdentityExpanded : global::S private string __processRecordId; /// An Azure Monitor Workspace definition - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource _azureMonitorWorkspacePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResource(); + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource _azureMonitorWorkspacePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResource(); /// /// 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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.MonitorWorkspace Client => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.ClientAPI; @@ -56,6 +74,9 @@ public partial class NewAzMonitorWorkspace_CreateViaIdentityExpanded : global::S [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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] @@ -101,7 +122,7 @@ public partial class NewAzMonitorWorkspace_CreateViaIdentityExpanded : global::S /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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")] @@ -128,44 +149,44 @@ public partial class NewAzMonitorWorkspace_CreateViaIdentityExpanded : global::S ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.ITrackedResourceTags Tag { get => _azureMonitorWorkspacePropertiesBody.Tag ?? null /* object */; set => _azureMonitorWorkspacePropertiesBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.ITrackedResourceTags Tag { get => _azureMonitorWorkspacePropertiesBody.Tag ?? null /* object */; set => _azureMonitorWorkspacePropertiesBody.Tag = value; } /// /// overrideOnCreated will be called before the regular onCreated 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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// 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.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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); + 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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource /// 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) @@ -188,6 +209,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -252,8 +278,33 @@ protected override void EndProcessing() 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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -263,7 +314,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzMonitorWorkspace_CreateViaIdentityExpanded() { @@ -317,7 +368,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -332,7 +383,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.AzureMonitorWorkspacesCreateViaIdentity(InputObject.Id, _azureMonitorWorkspacePropertiesBody, onOk, onCreated, onDefault, this, Pipeline); + await this.Client.AzureMonitorWorkspacesCreateViaIdentity(InputObject.Id, _azureMonitorWorkspacePropertiesBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeCreate); } else { @@ -349,13 +400,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AzureMonitorWorkspaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.AzureMonitorWorkspacesCreate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.AzureMonitorWorkspaceName ?? null, _azureMonitorWorkspacePropertiesBody, onOk, onCreated, onDefault, this, Pipeline); + await this.Client.AzureMonitorWorkspacesCreate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.AzureMonitorWorkspaceName ?? null, _azureMonitorWorkspacePropertiesBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_azureMonitorWorkspacePropertiesBody}) + 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 } }); @@ -391,12 +442,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -408,8 +459,26 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + 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; + } + } } } @@ -417,12 +486,12 @@ protected override void StopProcessing() /// 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.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -439,15 +508,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_azureMonitorWorkspacePropertiesBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 { body=_azureMonitorWorkspacePropertiesBody }) + 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 } }); @@ -457,12 +526,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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource /// 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 ) { @@ -474,8 +543,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + 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; + } + } } } } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/NewAzMonitorWorkspace_CreateViaJsonFilePath.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/NewAzMonitorWorkspace_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..2194516977e2 --- /dev/null +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/NewAzMonitorWorkspace_CreateViaJsonFilePath.cs @@ -0,0 +1,579 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Cmdlets; + using System; + + /// create a workspace + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMonitorWorkspace_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState" } , ChangeDescription = "The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Description(@"create a workspace")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}", ApiVersion = "2023-04-03")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.NotSuggestDefaultParameterSet] + public partial class NewAzMonitorWorkspace_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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; + + public global::System.String _jsonString; + + /// + /// 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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.MonitorWorkspace Client => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Create operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Azure Monitor workspace. The name is case insensitive + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure Monitor workspace. The name is case insensitive")] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure Monitor workspace. The name is case insensitive", + SerializedName = @"azureMonitorWorkspaceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("AzureMonitorWorkspaceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated 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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// 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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + /// 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.Monitor.MonitorWorkspace.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzMonitorWorkspace_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AzureMonitorWorkspacesCreate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AzureMonitorWorkspacesCreateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onCreated, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + 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; + } + } + } + } + + /// + /// 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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + /// 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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + 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/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/NewAzMonitorWorkspace_CreateViaJsonString.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/NewAzMonitorWorkspace_CreateViaJsonString.cs new file mode 100644 index 000000000000..c6ae6559f5f1 --- /dev/null +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/NewAzMonitorWorkspace_CreateViaJsonString.cs @@ -0,0 +1,577 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Cmdlets; + using System; + + /// create a workspace + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMonitorWorkspace_CreateViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState" } , ChangeDescription = "The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Description(@"create a workspace")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}", ApiVersion = "2023-04-03")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.NotSuggestDefaultParameterSet] + public partial class NewAzMonitorWorkspace_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.MonitorWorkspace Client => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Create operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Azure Monitor workspace. The name is case insensitive + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure Monitor workspace. The name is case insensitive")] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure Monitor workspace. The name is case insensitive", + SerializedName = @"azureMonitorWorkspaceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("AzureMonitorWorkspaceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated 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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// 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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + /// 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.Monitor.MonitorWorkspace.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzMonitorWorkspace_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AzureMonitorWorkspacesCreate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AzureMonitorWorkspacesCreateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onCreated, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + 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; + } + } + } + } + + /// + /// 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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + /// 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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + 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/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/RemoveAzMonitorWorkspace_Delete.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/RemoveAzMonitorWorkspace_Delete.cs index 1cce0657b4af..50a18c0509ab 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/RemoveAzMonitorWorkspace_Delete.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/RemoveAzMonitorWorkspace_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Cmdlets; using System; /// Delete a workspace @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}", ApiVersion = "2023-04-03")] public partial class RemoveAzMonitorWorkspace_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,6 +37,9 @@ public partial class RemoveAzMonitorWorkspace_Delete : global::System.Management /// 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(); + /// 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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Runtime)] @@ -44,6 +50,9 @@ public partial class RemoveAzMonitorWorkspace_Delete : global::System.Management [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.MonitorWorkspace Client => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.ClientAPI; @@ -57,6 +66,9 @@ public partial class RemoveAzMonitorWorkspace_Delete : global::System.Management [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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] @@ -113,7 +125,7 @@ public partial class RemoveAzMonitorWorkspace_Delete : global::System.Management /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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")] @@ -159,7 +171,8 @@ public partial class RemoveAzMonitorWorkspace_Delete : global::System.Management [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -168,12 +181,12 @@ public partial class RemoveAzMonitorWorkspace_Delete : global::System.Management /// 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.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -185,6 +198,16 @@ public partial class RemoveAzMonitorWorkspace_Delete : global::System.Management partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, 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. + /// /// 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, ref global::System.Threading.Tasks.Task returnNow); + /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// @@ -293,11 +316,36 @@ protected override void EndProcessing() 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.Monitor.MonitorWorkspace.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 ; + } case Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -309,10 +357,26 @@ protected override void EndProcessing() 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.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -380,7 +444,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -393,12 +457,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.AzureMonitorWorkspacesDelete(SubscriptionId, ResourceGroupName, Name, onNoContent, onDefault, this, Pipeline); + await this.Client.AzureMonitorWorkspacesDelete(SubscriptionId, ResourceGroupName, Name, onNoContent, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -411,7 +475,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzMonitorWorkspace_Delete() { @@ -444,12 +508,12 @@ protected override void StopProcessing() /// 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.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -466,15 +530,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + 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 } }); @@ -499,7 +563,31 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/RemoveAzMonitorWorkspace_DeleteViaIdentity.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/RemoveAzMonitorWorkspace_DeleteViaIdentity.cs index 1aa86ed24cd2..09aa4565a821 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/RemoveAzMonitorWorkspace_DeleteViaIdentity.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/RemoveAzMonitorWorkspace_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Cmdlets; using System; /// Delete a workspace @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}", ApiVersion = "2023-04-03")] public partial class RemoveAzMonitorWorkspace_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,6 +37,9 @@ public partial class RemoveAzMonitorWorkspace_DeleteViaIdentity : global::System /// 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(); + /// 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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Runtime)] @@ -44,6 +50,9 @@ public partial class RemoveAzMonitorWorkspace_DeleteViaIdentity : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.MonitorWorkspace Client => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.ClientAPI; @@ -57,6 +66,9 @@ public partial class RemoveAzMonitorWorkspace_DeleteViaIdentity : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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] @@ -106,7 +118,7 @@ public partial class RemoveAzMonitorWorkspace_DeleteViaIdentity : global::System /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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")] @@ -129,12 +141,12 @@ public partial class RemoveAzMonitorWorkspace_DeleteViaIdentity : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -146,6 +158,16 @@ public partial class RemoveAzMonitorWorkspace_DeleteViaIdentity : global::System partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, 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. + /// /// 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, ref global::System.Threading.Tasks.Task returnNow); + /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// @@ -251,11 +273,36 @@ protected override void EndProcessing() 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.Monitor.MonitorWorkspace.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 ; + } case Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -267,10 +314,26 @@ protected override void EndProcessing() 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.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -338,7 +401,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -353,7 +416,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.AzureMonitorWorkspacesDeleteViaIdentity(InputObject.Id, onNoContent, onDefault, this, Pipeline); + await this.Client.AzureMonitorWorkspacesDeleteViaIdentity(InputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); } else { @@ -370,13 +433,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AzureMonitorWorkspaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.AzureMonitorWorkspacesDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.AzureMonitorWorkspaceName ?? null, onNoContent, onDefault, this, Pipeline); + await this.Client.AzureMonitorWorkspacesDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.AzureMonitorWorkspaceName ?? null, onNoContent, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -389,7 +452,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzMonitorWorkspace_DeleteViaIdentity() { @@ -422,12 +485,12 @@ protected override void StopProcessing() /// 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.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -444,7 +507,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 } @@ -477,7 +540,31 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/UpdateAzMonitorWorkspace_UpdateExpanded.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/UpdateAzMonitorWorkspace_UpdateExpanded.cs index f8fb2ac9ea38..8a74353508f4 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/UpdateAzMonitorWorkspace_UpdateExpanded.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/UpdateAzMonitorWorkspace_UpdateExpanded.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Cmdlets; using System; - /// Updates part of a workspace + /// update part of a workspace /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMonitorWorkspace_UpdateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties=new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties=new string[] {"PrivateEndpointConnection","ProvisioningState"}, ChangeDescription="The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Description(@"Updates part of a workspace")] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState" } , ChangeDescription = "The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Description(@"update part of a workspace")] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}", ApiVersion = "2023-04-03")] public partial class UpdateAzMonitorWorkspace_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -31,18 +34,33 @@ public partial class UpdateAzMonitorWorkspace_UpdateExpanded : global::System.Ma private string __processRecordId; /// Definition of ARM tracked top level resource properties for update operation - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdate _azureMonitorWorkspacePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResourceForUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdate _azureMonitorWorkspacePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceForUpdate(); /// /// 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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.MonitorWorkspace Client => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.ClientAPI; @@ -56,6 +74,9 @@ public partial class UpdateAzMonitorWorkspace_UpdateExpanded : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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] @@ -97,7 +118,7 @@ public partial class UpdateAzMonitorWorkspace_UpdateExpanded : global::System.Ma /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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")] @@ -143,7 +164,8 @@ public partial class UpdateAzMonitorWorkspace_UpdateExpanded : global::System.Ma [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -156,32 +178,32 @@ public partial class UpdateAzMonitorWorkspace_UpdateExpanded : global::System.Ma ReadOnly = false, Description = @"Resource tags", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags Tag { get => _azureMonitorWorkspacePropertiesBody.Tag ?? null /* object */; set => _azureMonitorWorkspacePropertiesBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags Tag { get => _azureMonitorWorkspacePropertiesBody.Tag ?? null /* object */; set => _azureMonitorWorkspacePropertiesBody.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 /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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); + 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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource /// 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) @@ -204,6 +226,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -268,8 +295,33 @@ protected override void EndProcessing() 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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -325,7 +377,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -338,12 +390,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.AzureMonitorWorkspacesUpdate(SubscriptionId, ResourceGroupName, Name, _azureMonitorWorkspacePropertiesBody, onOk, onDefault, this, Pipeline); + await this.Client.AzureMonitorWorkspacesUpdate(SubscriptionId, ResourceGroupName, Name, _azureMonitorWorkspacePropertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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,Name=Name,body=_azureMonitorWorkspacePropertiesBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -363,7 +415,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzMonitorWorkspace_UpdateExpanded() { @@ -389,12 +441,12 @@ public UpdateAzMonitorWorkspace_UpdateExpanded() /// 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.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -411,15 +463,15 @@ public UpdateAzMonitorWorkspace_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_azureMonitorWorkspacePropertiesBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_azureMonitorWorkspacePropertiesBody }) + 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 } }); @@ -429,12 +481,12 @@ public UpdateAzMonitorWorkspace_UpdateExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource /// 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 ) { @@ -446,8 +498,26 @@ public UpdateAzMonitorWorkspace_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + 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; + } + } } } } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/UpdateAzMonitorWorkspace_UpdateViaIdentityExpanded.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/UpdateAzMonitorWorkspace_UpdateViaIdentityExpanded.cs index 1462ece962d5..6c2e1b21f339 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/UpdateAzMonitorWorkspace_UpdateViaIdentityExpanded.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/UpdateAzMonitorWorkspace_UpdateViaIdentityExpanded.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Cmdlets; using System; - /// Updates part of a workspace + /// update part of a workspace /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMonitorWorkspace_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties=new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties=new string[] {"PrivateEndpointConnection","ProvisioningState"}, ChangeDescription="The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Description(@"Updates part of a workspace")] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState" } , ChangeDescription = "The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Description(@"update part of a workspace")] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}", ApiVersion = "2023-04-03")] public partial class UpdateAzMonitorWorkspace_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -31,18 +34,33 @@ public partial class UpdateAzMonitorWorkspace_UpdateViaIdentityExpanded : global private string __processRecordId; /// Definition of ARM tracked top level resource properties for update operation - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdate _azureMonitorWorkspacePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.AzureMonitorWorkspaceResourceForUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdate _azureMonitorWorkspacePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.AzureMonitorWorkspaceResourceForUpdate(); /// /// 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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.MonitorWorkspace Client => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.ClientAPI; @@ -56,6 +74,9 @@ public partial class UpdateAzMonitorWorkspace_UpdateViaIdentityExpanded : global [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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] @@ -90,7 +111,7 @@ public partial class UpdateAzMonitorWorkspace_UpdateViaIdentityExpanded : global /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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")] @@ -117,32 +138,32 @@ public partial class UpdateAzMonitorWorkspace_UpdateViaIdentityExpanded : global ReadOnly = false, Description = @"Resource tags", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResourceForUpdateTags Tag { get => _azureMonitorWorkspacePropertiesBody.Tag ?? null /* object */; set => _azureMonitorWorkspacePropertiesBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResourceForUpdateTags Tag { get => _azureMonitorWorkspacePropertiesBody.Tag ?? null /* object */; set => _azureMonitorWorkspacePropertiesBody.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 /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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); + 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.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource /// 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) @@ -165,6 +186,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -229,8 +255,33 @@ protected override void EndProcessing() 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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -286,7 +337,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -301,7 +352,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.AzureMonitorWorkspacesUpdateViaIdentity(InputObject.Id, _azureMonitorWorkspacePropertiesBody, onOk, onDefault, this, Pipeline); + await this.Client.AzureMonitorWorkspacesUpdateViaIdentity(InputObject.Id, _azureMonitorWorkspacePropertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeUpdate); } else { @@ -318,13 +369,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AzureMonitorWorkspaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.AzureMonitorWorkspacesUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.AzureMonitorWorkspaceName ?? null, _azureMonitorWorkspacePropertiesBody, onOk, onDefault, this, Pipeline); + await this.Client.AzureMonitorWorkspacesUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.AzureMonitorWorkspaceName ?? null, _azureMonitorWorkspacePropertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_azureMonitorWorkspacePropertiesBody}) + 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 } }); @@ -344,7 +395,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzMonitorWorkspace_UpdateViaIdentityExpanded() { @@ -370,12 +421,12 @@ public UpdateAzMonitorWorkspace_UpdateViaIdentityExpanded() /// 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.Monitor.MonitorWorkspace.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -392,15 +443,15 @@ public UpdateAzMonitorWorkspace_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_azureMonitorWorkspacePropertiesBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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 { body=_azureMonitorWorkspacePropertiesBody }) + 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 } }); @@ -410,12 +461,12 @@ public UpdateAzMonitorWorkspace_UpdateViaIdentityExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource /// 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 ) { @@ -427,8 +478,26 @@ public UpdateAzMonitorWorkspace_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + 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; + } + } } } } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/UpdateAzMonitorWorkspace_UpdateViaJsonFilePath.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/UpdateAzMonitorWorkspace_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..cef2fd53c840 --- /dev/null +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/UpdateAzMonitorWorkspace_UpdateViaJsonFilePath.cs @@ -0,0 +1,525 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Cmdlets; + using System; + + /// update part of a workspace + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMonitorWorkspace_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState" } , ChangeDescription = "The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Description(@"update part of a workspace")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}", ApiVersion = "2023-04-03")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.NotSuggestDefaultParameterSet] + public partial class UpdateAzMonitorWorkspace_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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; + + public global::System.String _jsonString; + + /// + /// 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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.MonitorWorkspace Client => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Update operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Azure Monitor workspace. The name is case insensitive + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure Monitor workspace. The name is case insensitive")] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure Monitor workspace. The name is case insensitive", + SerializedName = @"azureMonitorWorkspaceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("AzureMonitorWorkspaceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + /// 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.Monitor.MonitorWorkspace.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AzureMonitorWorkspacesUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AzureMonitorWorkspacesUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzMonitorWorkspace_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + /// 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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + 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/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/UpdateAzMonitorWorkspace_UpdateViaJsonString.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/UpdateAzMonitorWorkspace_UpdateViaJsonString.cs new file mode 100644 index 000000000000..9bf112e95213 --- /dev/null +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/cmdlets/UpdateAzMonitorWorkspace_UpdateViaJsonString.cs @@ -0,0 +1,523 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Cmdlets; + using System; + + /// update part of a workspace + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMonitorWorkspace_UpdateViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState"}, NewOutputProperties = new string[] {"PrivateEndpointConnection","ProvisioningState" } , ChangeDescription = "The types of the properties PrivateEndpointConnection and ProvisioningState will be changed from single object or fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Description(@"update part of a workspace")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}", ApiVersion = "2023-04-03")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.NotSuggestDefaultParameterSet] + public partial class UpdateAzMonitorWorkspace_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.MonitorWorkspace Client => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Update operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Azure Monitor workspace. The name is case insensitive + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure Monitor workspace. The name is case insensitive")] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure Monitor workspace. The name is case insensitive", + SerializedName = @"azureMonitorWorkspaceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("AzureMonitorWorkspaceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + /// 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.Monitor.MonitorWorkspace.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AzureMonitorWorkspacesUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AzureMonitorWorkspacesUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzMonitorWorkspace_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + /// 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.Monitor.MonitorWorkspace.Models.IAzureMonitorWorkspaceResource + 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/Monitor/MonitorWorkspace.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs new file mode 100644 index 000000000000..7489560820e9 --- /dev/null +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace +{ + using System; + using System.Collections.Generic; + using System.Text; + + [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)] + public class ExternalDocsAttribute : Attribute + { + + public string Description { get; } + + public string Url { get; } + + public ExternalDocsAttribute(string url) + { + Url = url; + } + + public ExternalDocsAttribute(string url, string description) + { + Url = url; + Description = description; + } + } +} diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs new file mode 100644 index 000000000000..ab9ff1bd8b8d --- /dev/null +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace +{ + public class PSArgumentCompleterAttribute : ArgumentCompleterAttribute + { + internal string[] ResourceTypes; + + public PSArgumentCompleterAttribute(params string[] argumentList) : base(CreateScriptBlock(argumentList)) + { + ResourceTypes = argumentList; + } + + public static ScriptBlock CreateScriptBlock(string[] resourceTypes) + { + List outputResourceTypes = new List(); + foreach (string resourceType in resourceTypes) + { + if (resourceType.Contains(" ")) + { + outputResourceTypes.Add("\'\'" + resourceType + "\'\'"); + } + else + { + outputResourceTypes.Add(resourceType); + } + } + string scriptResourceTypeList = "'" + String.Join("' , '", outputResourceTypes) + "'"; + string script = "param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)\n" + + String.Format("$values = {0}\n", scriptResourceTypeList) + + "$values | Where-Object { $_ -Like \"$wordToComplete*\" -or $_ -Like \"'$wordToComplete*\" } | Sort-Object | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) }"; + ScriptBlock scriptBlock = ScriptBlock.Create(script); + return scriptBlock; + } + } +} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs index fa78e12c1173..42f1b3c7825b 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs @@ -20,11 +20,13 @@ public class ExportFormatPs1xml : PSCmdlet public string FilePath { get; set; } private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models"; - private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; private const string PropertiesExcludedForTableview = @"Id,Type"; private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + private static string SelectedBySuffix = @"#Multiple"; + protected override void ProcessRecord() { try @@ -76,7 +78,7 @@ private static View CreateViewModel(ViewParameters viewParameters) Name = viewParameters.Type.FullName, ViewSelectedBy = new ViewSelectedBy { - TypeName = viewParameters.Type.FullName + TypeName = string.Concat(viewParameters.Type.FullName, SelectedBySuffix) }, TableControl = new TableControl { diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs index c51209136051..47f86f2969ac 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs @@ -24,7 +24,7 @@ public class ExportModelSurface : PSCmdlet public bool UseExpandedFormat { get; set; } private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models"; - private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; protected override void ProcessRecord() { diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs index d890f1a171be..93c4d3d6da3d 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -70,9 +70,8 @@ protected override void ProcessRecord() var variantGroups = profileGroups.SelectMany(pg => pg.Variants .GroupBy(v => new { v.CmdletName, v.IsInternal }) .Select(vg => new VariantGroup(ModuleName, vg.Key.CmdletName, vg.Select(v => v).ToArray(), - Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) + Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) .ToArray(); - var license = new StringBuilder(); license.Append(@" # ---------------------------------------------------------------------------------- @@ -114,6 +113,7 @@ protected override void ProcessRecord() sb.Append("param("); sb.Append($"{(parameterGroups.Any() ? Environment.NewLine : String.Empty)}"); + foreach (var parameterGroup in parameterGroups) { var parameters = parameterGroup.HasAllVariants ? parameterGroup.Parameters.Take(1) : parameterGroup.Parameters; diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs index 9932b9b7e500..9120fd55ce0d 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -137,7 +137,7 @@ protected override void ProcessRecord() } else { - var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().Append("*").ToPsList(); + var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().ToPsList(); sb.AppendLine($@"{Indent}FunctionsToExport = {cmdletsList}"); } @@ -148,8 +148,10 @@ protected override void ProcessRecord() } else { - var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().Append("*").ToPsList(); - sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); + var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().ToPsList(); + if (!String.IsNullOrEmpty(aliasesList)) { + sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); + } } // CmdletsToExport diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs index 4abd63cef690..a58c14d6ba3a 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs @@ -12,50 +12,96 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PowerShell { - [Cmdlet(VerbsData.Export, "TestStub")] - [DoNotExport] - public class ExportTestStub : PSCmdlet - { - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string ModuleName { get; set; } - - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string ExportsFolder { get; set; } - - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string OutputFolder { get; set; } - - [Parameter] - public SwitchParameter IncludeGenerated { get; set; } - - protected override void ProcessRecord() + [Cmdlet(VerbsData.Export, "TestStub")] + [DoNotExport] + public class ExportTestStub : PSCmdlet { - try - { - if (!Directory.Exists(ExportsFolder)) - { - throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); - } + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } - var exportDirectories = Directory.GetDirectories(ExportsFolder); - if (!exportDirectories.Any()) - { - exportDirectories = new[] { ExportsFolder }; - } - var utilFile = Path.Combine(OutputFolder, "utils.ps1"); - if (!File.Exists(utilFile)) + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public SwitchParameter IncludeGenerated { get; set; } + + protected override void ProcessRecord() { - var sc = new StringBuilder(); - sc.AppendLine(@"function RandomString([bool]$allChars, [int32]$len) { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + var exportDirectories = Directory.GetDirectories(ExportsFolder); + if (!exportDirectories.Any()) + { + exportDirectories = new[] { ExportsFolder }; + } + /*var loadEnvFile = Path.Combine(OutputFolder, "loadEnv.ps1"); + if (!File.Exists(loadEnvFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@" +$envFile = 'env.json' +if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' +} + +if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { + $envFilePath = Join-Path $PSScriptRoot $envFile +} else { + $envFilePath = Join-Path $PSScriptRoot '..\$envFile' +} +$env = @{} +if (Test-Path -Path $envFilePath) { + $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json +}"); + File.WriteAllText(loadEnvFile, sc.ToString()); + }*/ + var utilFile = Path.Combine(OutputFolder, "utils.ps1"); + if (!File.Exists(utilFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@"function RandomString([bool]$allChars, [int32]$len) { if ($allChars) { return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) } else { return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) } } +function Start-TestSleep { + [CmdletBinding(DefaultParameterSetName = 'SleepBySeconds')] + param( + [parameter(Mandatory = $true, Position = 0, ParameterSetName = 'SleepBySeconds')] + [ValidateRange(0.0, 2147483.0)] + [double] $Seconds, + + [parameter(Mandatory = $true, ParameterSetName = 'SleepByMilliseconds')] + [ValidateRange('NonNegative')] + [Alias('ms')] + [int] $Milliseconds + ) + + if ($TestMode -ne 'playback') { + switch ($PSCmdlet.ParameterSetName) { + 'SleepBySeconds' { + Start-Sleep -Seconds $Seconds + } + 'SleepByMilliseconds' { + Start-Sleep -Milliseconds $Milliseconds + } + } + } +} + $env = @{} if ($UsePreviousConfigForRecord) { $previousEnv = Get-Content (Join-Path $PSScriptRoot 'env.json') | ConvertFrom-Json @@ -80,37 +126,40 @@ function cleanupEnv() { # Clean resources you create for testing } "); - File.WriteAllText(utilFile, sc.ToString()); - } - foreach (var exportDirectory in exportDirectories) - { - var outputFolder = OutputFolder; - if (exportDirectory != ExportsFolder) - { - outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); - Directory.CreateDirectory(outputFolder); - } - - var variantGroups = GetScriptCmdlets(exportDirectory) - .SelectMany(fi => fi.ToVariants()) - .Where(v => !v.IsDoNotExport) - .GroupBy(v => v.CmdletName) - .Select(vg => new VariantGroup(ModuleName, vg.Key, vg.Select(v => v).ToArray(), outputFolder, isTest: true)) - .Where(vtg => !File.Exists(vtg.FilePath) && (IncludeGenerated || !vtg.IsGenerated)); - - foreach (var variantGroup in variantGroups) - { - var sb = new StringBuilder(); - sb.AppendLine($"if(($null -eq $TestName) -or ($TestName -contains '{variantGroup.CmdletName}'))"); - sb.AppendLine(@"{ + File.WriteAllText(utilFile, sc.ToString()); + } + + + + foreach (var exportDirectory in exportDirectories) + { + var outputFolder = OutputFolder; + if (exportDirectory != ExportsFolder) + { + outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); + Directory.CreateDirectory(outputFolder); + } + + var variantGroups = GetScriptCmdlets(exportDirectory) + .SelectMany(fi => fi.ToVariants()) + .Where(v => !v.IsDoNotExport) + .GroupBy(v => v.CmdletName) + .Select(vg => new VariantGroup(ModuleName, vg.Key, vg.Select(v => v).ToArray(), outputFolder, isTest: true)) + .Where(vtg => !File.Exists(vtg.FilePath) && (IncludeGenerated || !vtg.IsGenerated)); + + foreach (var variantGroup in variantGroups) + { + var sb = new StringBuilder(); + sb.AppendLine($"if(($null -eq $TestName) -or ($TestName -contains '{variantGroup.CmdletName}'))"); + sb.AppendLine(@"{ $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' if (-Not (Test-Path -Path $loadEnvPath)) { $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' } . ($loadEnvPath)" -); - sb.AppendLine($@" $TestRecordingFile = Join-Path $PSScriptRoot '{variantGroup.CmdletName}.Recording.json'"); - sb.AppendLine(@" $currentPath = $PSScriptRoot + ); + sb.AppendLine($@" $TestRecordingFile = Join-Path $PSScriptRoot '{variantGroup.CmdletName}.Recording.json'"); + sb.AppendLine(@" $currentPath = $PSScriptRoot while(-not $mockingPath) { $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File $currentPath = Split-Path -Path $currentPath -Parent @@ -120,29 +169,29 @@ function cleanupEnv() { "); - sb.AppendLine($"Describe '{variantGroup.CmdletName}' {{"); - var variants = variantGroup.Variants - .Where(v => IncludeGenerated || !v.Attributes.OfType().Any()) - .ToList(); + sb.AppendLine($"Describe '{variantGroup.CmdletName}' {{"); + var variants = variantGroup.Variants + .Where(v => IncludeGenerated || !v.Attributes.OfType().Any()) + .ToList(); - foreach (var variant in variants) + foreach (var variant in variants) + { + sb.AppendLine($"{Indent}It '{variant.VariantName}' -skip {{"); + sb.AppendLine($"{Indent}{Indent}{{ throw [System.NotImplementedException] }} | Should -Not -Throw"); + var variantSeparator = variants.IndexOf(variant) == variants.Count - 1 ? String.Empty : Environment.NewLine; + sb.AppendLine($"{Indent}}}{variantSeparator}"); + } + sb.AppendLine("}"); + + File.WriteAllText(variantGroup.FilePath, sb.ToString()); + } + } + } + catch (Exception ee) { - sb.AppendLine($"{Indent}It '{variant.VariantName}' -skip {{"); - sb.AppendLine($"{Indent}{Indent}{{ throw [System.NotImplementedException] }} | Should -Not -Throw"); - var variantSeparator = variants.IndexOf(variant) == variants.Count - 1 ? String.Empty : Environment.NewLine; - sb.AppendLine($"{Indent}}}{variantSeparator}"); + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; } - sb.AppendLine("}"); - - File.WriteAllText(variantGroup.FilePath, sb.ToString()); - } } - } - catch (Exception ee) - { - Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); - throw ee; - } } - } } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs index d4cc1217c413..061a58424b25 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -94,7 +94,7 @@ public static void WriteMarkdowns(IEnumerable variantGroups, PsMod sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}"); foreach (var relatedLink in markdownInfo.RelatedLinks) { - sb.Append($"{relatedLink}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"[{relatedLink}]({relatedLink}){Environment.NewLine}{Environment.NewLine}"); } File.WriteAllText(Path.Combine(docsFolder, $"{markdownInfo.CmdletName}.md"), sb.ToString()); diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs index 8f1a80074081..900988c5a2d3 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs +++ b/generated/Monitor/MonitorWorkspace.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/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs index 0333739a317b..99ab9cbdcfe7 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs @@ -31,7 +31,7 @@ internal class MarkdownHelpInfo public string[] Inputs { get; } public string[] Outputs { get; } public ComplexInterfaceInfo[] ComplexInterfaceInfos { get; } - public string[] RelatedLinks { get; } + public MarkdownRelatedLinkInfo[] RelatedLinks { get; } public bool SupportsShouldProcess { get; } public bool SupportsPaging { get; } @@ -67,7 +67,11 @@ public MarkdownHelpInfo(VariantGroup variantGroup, string examplesFolder, string ComplexInterfaceInfos = variantGroup.ComplexInterfaceInfos; OnlineVersion = commentInfo.OnlineVersion; - RelatedLinks = commentInfo.RelatedLinks; + + var relatedLinkLists = new List(); + relatedLinkLists.AddRange(commentInfo.RelatedLinks?.Select(link => new MarkdownRelatedLinkInfo(link))); + relatedLinkLists.AddRange(variantGroup.Variants.SelectMany(v => v.Attributes).OfType()?.Distinct()?.Select(link => new MarkdownRelatedLinkInfo(link.Url, link.Description))); + RelatedLinks = relatedLinkLists?.ToArray(); SupportsShouldProcess = variantGroup.SupportsShouldProcess; SupportsPaging = variantGroup.SupportsPaging; @@ -218,14 +222,45 @@ public MarkdownParameterHelpInfo(PsParameterHelpInfo[] parameterHelpInfos, Param } } + internal class MarkdownRelatedLinkInfo + { + public string Url { get; } + public string Description { get; } + + public MarkdownRelatedLinkInfo(string url) + { + Url = url; + } + + public MarkdownRelatedLinkInfo(string url, string description) + { + Url = url; + Description = description; + } + + public override string ToString() + { + if (string.IsNullOrEmpty(Description)) + { + return Url; + } + else + { + return $@"[{Description}]({Url})"; + + } + + } + } + internal static class MarkdownTypesExtensions { public static MarkdownExampleHelpInfo ToExampleHelpInfo(this PsHelpExampleInfo exampleInfo) => new MarkdownExampleHelpInfo(exampleInfo.Title, exampleInfo.Code, exampleInfo.Output, exampleInfo.Remarks); public static MarkdownExampleHelpInfo[] DefaultExampleHelpInfos = { - new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), - new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here (remove the output block if the example doesn't have an output) }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here (remove the output block if the example doesn't have an output) }}}}", @"{{ Add description here }}"), }; public static MarkdownParameterHelpInfo[] SupportsShouldProcessParameters = diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 70c2bcde055b..4cc2d57fd79e 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -121,6 +121,21 @@ public override string ToString() => CompleterInfo != null : String.Empty; } + internal class PSArgumentCompleterOutput : ArgumentCompleterOutput + { + public PSArgumentCompleterInfo PSArgumentCompleterInfo { get; } + + public PSArgumentCompleterOutput(PSArgumentCompleterInfo completerInfo) : base(completerInfo) + { + PSArgumentCompleterInfo = completerInfo; + } + + + public override string ToString() => PSArgumentCompleterInfo != null + ? $"{Indent}[{typeof(PSArgumentCompleterAttribute)}({(PSArgumentCompleterInfo.IsTypeCompleter ? $"[{PSArgumentCompleterInfo.Type.Unwrap().ToPsType()}]" : $"{PSArgumentCompleterInfo.ResourceTypes?.Select(r => $"\"{r}\"")?.JoinIgnoreEmpty(", ")}")})]{Environment.NewLine}" + : String.Empty; + } + internal class DefaultInfoOutput { public bool HasDefaultInfo { get; } @@ -173,6 +188,7 @@ internal class BaseOutput public VariantGroup VariantGroup { get; } protected static readonly bool IsAzure = Convert.ToBoolean(@"true"); + public BaseOutput(VariantGroup variantGroup) { VariantGroup = variantGroup; @@ -200,6 +216,20 @@ public string GetProcessCustomAttributesAtRuntime() {Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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}throw ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" +{Indent}{Indent}}} +"; + } + return ""; + } + private string GetTelemetry() { if (!VariantGroup.IsInternal && IsAzure) @@ -232,10 +262,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.Monitor.MonitorWorkspace.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) @@ -269,13 +305,16 @@ private string GetDefaultValuesStatements() var variantListString = defaultInfo.ParameterGroup.VariantNames.ToPsList(); var parameterName = defaultInfo.ParameterGroup.ParameterName; sb.AppendLine(); + var setCondition = " "; + if (!String.IsNullOrEmpty(defaultInfo.SetCondition)) + { + setCondition = $" -and {defaultInfo.SetCondition}"; + } //Yabo: this is bad to hard code the subscription id, but autorest load input README.md reversely (entry readme -> required readme), there are no other way to //override default value set in required readme if ("SubscriptionId".Equals(parameterName)) { - sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); - sb.AppendLine($"{Indent}{Indent}{Indent}$testPlayback = $false"); - sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) }} }}"); + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); 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 {{"); @@ -285,13 +324,15 @@ private string GetDefaultValuesStatements() } else { - sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); sb.Append($"{Indent}{Indent}}}"); } + } return sb.ToString(); } + } internal class ProcessOutput : BaseOutput @@ -381,6 +422,8 @@ public override string ToString() var notesText = !String.IsNullOrEmpty(notes) ? $"{Environment.NewLine}.Notes{Environment.NewLine}{ComplexParameterHeader}{notes}" : String.Empty; var relatedLinks = String.Join(Environment.NewLine, CommentInfo.RelatedLinks.Select(l => $".Link{Environment.NewLine}{l}")); var relatedLinksText = !String.IsNullOrEmpty(relatedLinks) ? $"{Environment.NewLine}{relatedLinks}" : String.Empty; + var externalUrls = String.Join(Environment.NewLine, CommentInfo.ExternalUrls.Select(l => $".Link{Environment.NewLine}{l}")); + var externalUrlsText = !String.IsNullOrEmpty(externalUrls) ? $"{Environment.NewLine}{externalUrls}" : String.Empty; var examples = ""; foreach (var example in VariantGroup.HelpInfo.Examples) { @@ -393,7 +436,7 @@ public override string ToString() {CommentInfo.Description.ToDescriptionFormat(false)} {examples}{inputsText}{outputsText}{notesText} .Link -{CommentInfo.OnlineVersion}{relatedLinksText} +{CommentInfo.OnlineVersion}{relatedLinksText}{externalUrlsText} #> "; } @@ -587,7 +630,9 @@ public static string ToSyntaxTypeName(this Type type) public static AllowEmptyArrayOutput ToAllowEmptyArray(this bool hasAllowEmptyArray) => new AllowEmptyArrayOutput(hasAllowEmptyArray); - public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => new ArgumentCompleterOutput(completerInfo); + public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => (completerInfo is PSArgumentCompleterInfo psArgumentCompleterInfo) ? psArgumentCompleterInfo.ToArgumentCompleterOutput() : new ArgumentCompleterOutput(completerInfo); + + public static PSArgumentCompleterOutput ToArgumentCompleterOutput(this PSArgumentCompleterInfo completerInfo) => new PSArgumentCompleterOutput(completerInfo); public static DefaultInfoOutput ToDefaultInfoOutput(this ParameterGroup parameterGroup) => new DefaultInfoOutput(parameterGroup); diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs index 9cb96c626977..9ca63f5e0ece 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -31,7 +31,7 @@ internal class VariantGroup { public string ModuleName { get; } - public string RootModuleName {get => @"Az.Monitor";} + public string RootModuleName { get => @"Az.Monitor"; } public string CmdletName { get; } public string CmdletVerb { get; } public string CmdletNoun { get; } @@ -49,7 +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; } @@ -84,7 +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); @@ -101,12 +101,23 @@ private string DetermineDefaultParameterSetName() if (String.IsNullOrEmpty(defaultParameterSet)) { var variantParamCountGroups = Variants + .Where(v => !v.IsNotSuggestDefaultParameterSet) .Select(v => ( variant: v.VariantName, paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) .GroupBy(vpc => vpc.isSimple) .ToArray(); + if (variantParamCountGroups.Length == 0) + { + variantParamCountGroups = Variants + .Select(v => ( + variant: v.VariantName, + paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), + isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) + .GroupBy(vpc => vpc.isSimple) + .ToArray(); + } var variantParameterCounts = (variantParamCountGroups.Any(g => g.Key) ? variantParamCountGroups.Where(g => g.Key) : variantParamCountGroups).SelectMany(g => g).ToArray(); var smallestParameterCount = variantParameterCounts.Min(vpc => vpc.paramCount); defaultParameterSet = variantParameterCounts.First(vpc => vpc.paramCount == smallestParameterCount).variant; @@ -134,7 +145,9 @@ 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; } public Variant(string cmdletName, string variantName, CommandInfo info, CommandMetadata metadata, bool hasParameterSets = false, PsHelpInfo helpInfo = null) @@ -155,6 +168,8 @@ 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(); } @@ -210,6 +225,7 @@ public ParameterGroup(string parameterName, Parameter[] parameters, string[] all HasValidateNotNull = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); HasAllowEmptyArray = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); CompleterInfo = Parameters.Select(p => p.CompleterInfoAttribute).FirstOrDefault()?.ToCompleterInfo() + ?? Parameters.Select(p => p.PSArgumentCompleterAttribute).FirstOrDefault()?.ToPSArgumentCompleterInfo() ?? Parameters.Select(p => p.ArgumentCompleterAttribute).FirstOrDefault()?.ToCompleterInfo(); DefaultInfo = Parameters.Select(p => p.DefaultInfoAttribute).FirstOrDefault()?.ToDefaultInfo(this) ?? Parameters.Select(p => p.DefaultValueAttribute).FirstOrDefault(dv => dv != null)?.ToDefaultInfo(this); @@ -244,7 +260,6 @@ internal class Parameter public ParameterMetadata Metadata { get; } public PsParameterHelpInfo HelpInfo { get; } public Type ParameterType { get; } - public Attribute[] Attributes { get; } public ParameterCategory[] Categories { get; } public ParameterCategory OrderCategory { get; } @@ -254,6 +269,7 @@ internal class Parameter public bool SupportsWildcards { get; } public CompleterInfoAttribute CompleterInfoAttribute { get; } public ArgumentCompleterAttribute ArgumentCompleterAttribute { get; } + public PSArgumentCompleterAttribute PSArgumentCompleterAttribute { get; } public bool ValueFromPipeline { get; } public bool ValueFromPipelineByPropertyName { get; } @@ -286,7 +302,8 @@ public Parameter(string variantName, string parameterName, ParameterMetadata met } SupportsWildcards = Attributes.OfType().Any(); CompleterInfoAttribute = Attributes.OfType().FirstOrDefault(); - ArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(); + PSArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(); + ArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(attr => !attr.GetType().Equals(typeof(PSArgumentCompleterAttribute))); ValueFromPipeline = ParameterAttribute.ValueFromPipeline; ValueFromPipelineByPropertyName = ParameterAttribute.ValueFromPipelineByPropertyName; @@ -295,10 +312,10 @@ public Parameter(string variantName, string parameterName, ParameterMetadata met IsMandatory = ParameterAttribute.Mandatory; var complexParameterName = ParameterName.ToUpperInvariant(); - var complexMessage = $"{Environment.NewLine}To construct, see NOTES section for {complexParameterName} properties and create a hash table."; + var complexMessage = $"{Environment.NewLine}"; var description = ParameterAttribute.HelpMessage.NullIfEmpty() ?? HelpInfo.Description.NullIfEmpty() ?? InfoAttribute?.Description.NullIfEmpty() ?? String.Empty; // Remove the complex type message as it will be reinserted if this is a complex type - description = description.NormalizeNewLines().Replace(complexMessage, String.Empty).Replace(complexMessage.ToPsSingleLine(), String.Empty); + description = description.NormalizeNewLines(); // Make an InfoAttribute for processing only if one isn't provided InfoAttribute = Attributes.OfType().FirstOrDefault() ?? new InfoAttribute { PossibleTypes = new[] { ParameterType.Unwrap() }, Required = IsMandatory }; // Set the description if the InfoAttribute does not have one since they are exported without a description @@ -318,7 +335,7 @@ internal class ComplexInterfaceInfo public bool Required { get; } public bool ReadOnly { get; } public string Description { get; } - + public ComplexInterfaceInfo[] NestedInfos { get; } public bool IsComplexInterface { get; } @@ -335,7 +352,7 @@ public ComplexInterfaceInfo(string name, Type type, InfoAttribute infoAttribute, var unwrappedType = Type.Unwrap(); var hasBeenSeen = seenTypes?.Contains(unwrappedType) ?? false; (seenTypes ?? (seenTypes = new List())).Add(unwrappedType); - NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[]{} : + NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[] { } : unwrappedType.GetInterfaces() .Concat(InfoAttribute.PossibleTypes) .SelectMany(pt => pt.GetProperties() @@ -366,6 +383,7 @@ internal class CommentInfo public string OnlineVersion { get; } public string[] RelatedLinks { get; } + public string[] ExternalUrls { get; } private const string HelpLinkPrefix = @"https://learn.microsoft.com/powershell/module/"; @@ -374,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; @@ -391,6 +410,9 @@ public CommentInfo(VariantGroup variantGroup) var moduleName = variantGroup.RootModuleName == "" ? variantGroup.ModuleName.ToLowerInvariant() : variantGroup.RootModuleName.ToLowerInvariant(); OnlineVersion = helpInfo.OnlineVersion?.Uri.NullIfEmpty() ?? $@"{HelpLinkPrefix}{moduleName}/{variantGroup.CmdletName.ToLowerInvariant()}"; RelatedLinks = helpInfo.RelatedLinks.Select(rl => rl.Text).ToArray(); + + // Get external urls from attribute + ExternalUrls = variantGroup.Variants.SelectMany(v => v.Attributes).OfType()?.Select(e => e.Url)?.Distinct()?.ToArray(); } } @@ -420,11 +442,22 @@ public CompleterInfo(ArgumentCompleterAttribute completerAttribute) } } + internal class PSArgumentCompleterInfo : CompleterInfo + { + public string[] ResourceTypes { get; } + + public PSArgumentCompleterInfo(PSArgumentCompleterAttribute completerAttribute) : base(completerAttribute) + { + ResourceTypes = completerAttribute.ResourceTypes; + } + } + internal class DefaultInfo { public string Name { get; } public string Description { get; } public string Script { get; } + public string SetCondition { get; } public ParameterGroup ParameterGroup { get; } public DefaultInfo(DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) @@ -432,6 +465,7 @@ public DefaultInfo(DefaultInfoAttribute infoAttribute, ParameterGroup parameterG Name = infoAttribute.Name; Description = infoAttribute.Description; Script = infoAttribute.Script; + SetCondition = infoAttribute.SetCondition; ParameterGroup = parameterGroup; } @@ -479,7 +513,8 @@ public static Parameter[] ToParameters(this Variant variant) parameterHelp = parameterHelp.Where(ph => (!ph.ParameterSetNames.Any() || ph.ParameterSetNames.Any(psn => psn == variant.VariantName || psn == AllParameterSets)) && ph.Name != "IncludeTotalCount"); } var result = parameters.Select(p => new Parameter(variant.VariantName, p.Key, p.Value, parameterHelp.FirstOrDefault(ph => ph.Name == p.Key))); - if (variant.SupportsPaging) { + if (variant.SupportsPaging) + { // If supportsPaging is set, we will need to add First and Skip parameters since they are treated as common parameters which as not contained on Metadata>parameters variant.Info.Parameters["First"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Gets only the first 'n' objects."; variant.Info.Parameters["Skip"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Ignores the first 'n' objects and then gets the remaining objects."; @@ -507,7 +542,7 @@ public static ComplexInterfaceInfo ToComplexInterfaceInfo(this InfoAttribute inf public static CompleterInfo ToCompleterInfo(this CompleterInfoAttribute infoAttribute) => new CompleterInfo(infoAttribute); public static CompleterInfo ToCompleterInfo(this ArgumentCompleterAttribute completerAttribute) => new CompleterInfo(completerAttribute); - + public static PSArgumentCompleterInfo ToPSArgumentCompleterInfo(this PSArgumentCompleterAttribute completerAttribute) => new PSArgumentCompleterInfo(completerAttribute); public static DefaultInfo ToDefaultInfo(this DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) => new DefaultInfo(infoAttribute, parameterGroup); public static DefaultInfo ToDefaultInfo(this PSDefaultValueAttribute defaultValueAttribute, ParameterGroup parameterGroup) => new DefaultInfo(defaultValueAttribute, parameterGroup); } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/PsAttributes.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/PsAttributes.cs index 5181e5a2c3c5..cba482509035 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/PsAttributes.cs +++ b/generated/Monitor/MonitorWorkspace.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 { @@ -55,6 +60,11 @@ public class HttpPathAttribute : Attribute public string ApiVersion { get; set; } } + [AttributeUsage(AttributeTargets.Class)] + public class NotSuggestDefaultParameterSetAttribute : Attribute + { + } + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] public class CategoryAttribute : Attribute { @@ -109,6 +119,11 @@ public enum PropertyOrigin Inlined } + [AttributeUsage(AttributeTargets.Property)] + public class ConstantAttribute : Attribute + { + } + [AttributeUsage(AttributeTargets.Property)] public class FormatTableAttribute : Attribute { diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/PsExtensions.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/PsExtensions.cs index 57178ed6c9f4..ce66031de8e3 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/PsExtensions.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/PsExtensions.cs @@ -13,6 +13,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Po { internal static class PsExtensions { + public static PSObject AddMultipleTypeNameIntoPSObject(this object obj, string multipleTag = "#Multiple") + { + var psObj = new PSObject(obj); + psObj.TypeNames.Insert(0, $"{psObj.TypeNames[0]}{multipleTag}"); + return psObj; + } + // https://stackoverflow.com/a/863944/294804 // https://stackoverflow.com/a/4452598/294804 // https://stackoverflow.com/a/28701974/294804 diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/PsHelpers.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/PsHelpers.cs index bb21e1fd4722..a58e63692d64 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/PsHelpers.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/BuildTime/PsHelpers.cs @@ -67,7 +67,7 @@ public static IEnumerable GetScriptHelpInfo(params string[] modulePath public static IEnumerable GetModuleCmdletsAndHelpInfo(PSCmdlet cmdlet, params string[] modulePaths) { - var getCmdletAndHelp = String.Join(" + ", modulePaths.Select(mp => + var getCmdletAndHelp = String.Join(" + ", modulePaths.Select(mp => $@"(Get-Command -Module (Import-Module '{mp}' -PassThru) | Where-Object {{ $_.CommandType -ne 'Alias' }} | ForEach-Object {{ @{{ CommandInfo = $_; HelpInfo = ( invoke-command {{ try {{ Get-Help -Name $_.Name -Full }} catch{{ '' }} }} ) }} }})" )); return (cmdlet?.RunScript(getCmdletAndHelp) ?? RunScript(getCmdletAndHelp)) @@ -88,7 +88,7 @@ public static Guid ReadGuidFromPsd1(string psd1Path) if (File.Exists(psd1Path)) { var currentGuid = File.ReadAllLines(psd1Path) - .FirstOrDefault(l => l.StartsWith(GuidStart))?.Split(new[] { " = " }, StringSplitOptions.RemoveEmptyEntries) + .FirstOrDefault(l => l.TrimStart().StartsWith(GuidStart.TrimStart()))?.Split(new[] { " = " }, StringSplitOptions.RemoveEmptyEntries) .LastOrDefault()?.Replace("'", String.Empty); guid = currentGuid != null ? Guid.Parse(currentGuid) : guid; } diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/Context.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/Context.cs new file mode 100644 index 000000000000..4dd0cc538066 --- /dev/null +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/Context.cs @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime +{ + + using System; + using System.Linq; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData = System.Func; + using static Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Extensions; + + /// + /// The IContext Interface defines the communication mechanism for input customization. + /// + /// + /// In the context, we will have client, pipeline, PSBoundParameters, default EventListener, Cancellation. + /// + public interface IContext + { + System.Management.Automation.InvocationInfo InvocationInformation { get; set; } + System.Threading.CancellationTokenSource CancellationTokenSource { get; set; } + System.Collections.Generic.IDictionary ExtensibleParameters { get; } + HttpPipeline Pipeline { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.MonitorWorkspace Client { get; } + } +} diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/Events.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/Events.cs index d7796552e0eb..269440c1e9cf 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/Events.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/Events.cs @@ -22,6 +22,6 @@ public static partial class Events public const string FollowingNextLink = nameof(FollowingNextLink); public const string DelayBeforePolling = nameof(DelayBeforePolling); public const string Polling = nameof(Polling); - + public const string Progress = nameof(Progress); } -} \ No newline at end of file +} diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/ISendAsync.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/ISendAsync.cs index beb99d0a9d9c..3cfe5a9ad2f3 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/ISendAsync.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/ISendAsync.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime using System.Threading.Tasks; using System.Collections; using System.Linq; + using System; + /// /// The interface for sending an HTTP request across the wire. @@ -70,6 +72,7 @@ public interface ISendAsyncTerminalFactory public partial class HttpPipeline : ISendAsync { + private const int DefaultMaxRetry = 3; private ISendAsync pipeline; private ISendAsyncTerminalFactory terminal; private List steps = new List(); @@ -92,6 +95,111 @@ public HttpPipeline(ISendAsyncTerminalFactory terminalStep) /// public HttpPipeline Clone() => new HttpPipeline(terminal) { steps = this.steps.ToList(), pipeline = this.pipeline }; + private bool shouldRetry429(HttpResponseMessage response) + { + if (response.StatusCode == (System.Net.HttpStatusCode)429) + { + var retryAfter = response.Headers.RetryAfter; + if (retryAfter != null && retryAfter.Delta.HasValue) + { + return true; + } + } + return false; + } + /// + /// The step to handle 429 response with retry-after header. + /// + public async Task Retry429(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + int retryCount = int.MaxValue; + + try + { + try + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES_FOR_429")); + } + finally + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES_FOR_429")); + } + } + catch (System.Exception) + { + //no action + } + var cloneRequest = await request.CloneWithContent(); + var response = await next.SendAsync(request, callback); + int count = 0; + while (shouldRetry429(response) && count++ < retryCount) + { + request = await cloneRequest.CloneWithContent(); + var retryAfter = response.Headers.RetryAfter; + await Task.Delay(retryAfter.Delta.Value, callback.Token); + await callback.Signal("Debug", $"Start to retry {count} time(s) on status code 429 after waiting {retryAfter.Delta.Value.TotalSeconds} seconds."); + response = await next.SendAsync(request, callback); + } + return response; + } + + private bool shouldRetryError(HttpResponseMessage response) + { + if (response.StatusCode >= System.Net.HttpStatusCode.InternalServerError) + { + if (response.StatusCode != System.Net.HttpStatusCode.NotImplemented && + response.StatusCode != System.Net.HttpStatusCode.HttpVersionNotSupported) + { + return true; + } + } + else if (response.StatusCode == System.Net.HttpStatusCode.RequestTimeout) + { + return true; + } + else if (response.StatusCode == (System.Net.HttpStatusCode)429 && response.Headers.RetryAfter == null) + { + return true; + } + return false; + } + + /// + /// Returns true if status code in HttpRequestExceptionWithStatus exception is greater + /// than or equal to 500 and not NotImplemented (501) or HttpVersionNotSupported (505). + /// Or it's 429 (TOO MANY REQUESTS) without Retry-After header. + /// + public async Task RetryError(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + int retryCount = DefaultMaxRetry; + + try + { + try + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES")); + } + finally + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES")); + } + } + catch (System.Exception) + { + //no action + } + var cloneRequest = await request.CloneWithContent(); + var response = await next.SendAsync(request, callback); + int count = 0; + while (shouldRetryError(response) && count++ < retryCount) + { + await callback.Signal("Debug", $"Start to retry {count} time(s) on status code {response.StatusCode}"); + request = await cloneRequest.CloneWithContent(); + response = await next.SendAsync(request, callback); + } + return response; + } + public ISendAsyncTerminalFactory TerminalFactory { get => terminal; @@ -117,6 +225,11 @@ public ISendAsync Pipeline // create the pipeline from scratch. var next = terminal.Create(); + if (Convert.ToBoolean(@"true")) + { + next = (new SendAsyncFactory(Retry429)).Create(next) ?? next; + next = (new SendAsyncFactory(RetryError)).Create(next) ?? next; + } foreach (var factory in steps) { // skip factories that return null. diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/InfoAttribute.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/InfoAttribute.cs index 9136b06ec738..447701e959e8 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/InfoAttribute.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/InfoAttribute.cs @@ -11,6 +11,9 @@ public class InfoAttribute : Attribute { public bool Required { get; set; } = false; public bool ReadOnly { get; set; } = false; + public bool Read { get; set; } = true; + public bool Create { get; set; } = true; + public bool Update { get; set; } = true; public Type[] PossibleTypes { get; set; } = new Type[0]; public string Description { get; set; } = ""; public string SerializedName { get; set; } = ""; @@ -30,5 +33,6 @@ public class DefaultInfoAttribute : Attribute public string Script { get; set; } = ""; public string Name { get; set; } = ""; public string Description { get; set; } = ""; + public string SetCondition { get; set; } = ""; } } \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/InputHandler.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/InputHandler.cs new file mode 100644 index 000000000000..c8872de728e9 --- /dev/null +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/InputHandler.cs @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using System; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.Cmdlets +{ + public abstract class InputHandler + { + protected InputHandler NextHandler = null; + + public void SetNextHandler(InputHandler nextHandler) + { + this.NextHandler = nextHandler; + } + + public abstract void Process(Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Runtime.IContext context); + } +} \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/MessageAttribute.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/MessageAttribute.cs index 9145e82cba6e..81ffd44aef50 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/MessageAttribute.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/MessageAttribute.cs @@ -16,9 +16,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.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.Monitor") ? @"Az.MonitorWorkspace" : @"Az.Monitor"; + //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/Monitor/MonitorWorkspace.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs index 5806e8afd568..b9b0b78b5bc4 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs @@ -21,6 +21,11 @@ internal XNodeArray(params JsonNode[] values) items = new List(values); } + internal XNodeArray(System.Collections.Generic.List values) + { + items = new List(values); + } + public override JsonNode this[int index] => items[index]; internal override JsonType? ElementType => null; diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/Properties/Resources.resx b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/Properties/Resources.resx index a08a2e50172b..4ef90b70573d 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/Properties/Resources.resx +++ b/generated/Monitor/MonitorWorkspace.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/Monitor/MonitorWorkspace.Autorest/generated/runtime/SerializationMode.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/SerializationMode.cs index 58bf638f3713..5b568b3ba9ee 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/SerializationMode.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/SerializationMode.cs @@ -9,8 +9,10 @@ public enum SerializationMode { None = 0, IncludeHeaders = 1 << 0, - IncludeReadOnly = 1 << 1, - - IncludeAll = IncludeHeaders | IncludeReadOnly + IncludeRead = 1 << 1, + IncludeCreate = 1 << 2, + IncludeUpdate = 1 << 3, + IncludeAll = IncludeHeaders | IncludeRead | IncludeCreate | IncludeUpdate, + IncludeCreateOrUpdate = IncludeCreate | IncludeUpdate } } \ No newline at end of file diff --git a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/TypeConverterExtensions.cs b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/TypeConverterExtensions.cs index 2c2dfdf4b2a3..bd2d9db36d7c 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/TypeConverterExtensions.cs +++ b/generated/Monitor/MonitorWorkspace.Autorest/generated/runtime/TypeConverterExtensions.cs @@ -62,6 +62,56 @@ internal static T[] SelectToArray(object source, System.Func return result.ToArray(); } + internal static System.Collections.Generic.List SelectToList(object source, System.Func converter) + { + // null begets null + if (source == null) + { + return null; + } + + // single values and strings are just encapsulated in the array. + if (source is string || !(source is System.Collections.IEnumerable)) + { + try + { + return new T[] { (T)converter(source) }.ToList(); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + return new T[0].ToList(); // empty result if couldn't convert. + } + + var result = new System.Collections.Generic.List(); + foreach (var each in (System.Collections.IEnumerable)source) + { + try + { + result.Add((T)converter(each)); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + } + return result; + } internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Collections.Generic.IDictionary dictionary) { if (null != dictionary) diff --git a/generated/Monitor/MonitorWorkspace.Autorest/test-module.ps1 b/generated/Monitor/MonitorWorkspace.Autorest/test-module.ps1 index 12f5e911f25b..86925e86d7f6 100644 --- a/generated/Monitor/MonitorWorkspace.Autorest/test-module.ps1 +++ b/generated/Monitor/MonitorWorkspace.Autorest/test-module.ps1 @@ -12,17 +12,17 @@ # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- -param([switch]$Isolated, [switch]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule, [switch]$UsePreviousConfigForRecord, [string[]]$TestName) +param([switch]$NotIsolated, [switch]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule, [switch]$UsePreviousConfigForRecord, [string[]]$TestName) $ErrorActionPreference = 'Stop' -if(-not $Isolated) +if(-not $NotIsolated) { Write-Host -ForegroundColor Green 'Creating isolated process...' if ($PSBoundParameters.ContainsKey("TestName")) { $PSBoundParameters["TestName"] = $PSBoundParameters["TestName"] -join "," } $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path - & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated return } @@ -34,7 +34,7 @@ if ($PSBoundParameters.ContainsKey("TestName") -and ($TestName.count -eq 1) -and $ProgressPreference = 'SilentlyContinue' $baseName = $PSScriptRoot.BaseName $requireResourceModule = (($baseName -ne "Resources") -and ($Record.IsPresent -or $Live.IsPresent)) -. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -Isolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule +. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -NotIsolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule . ("$PSScriptRoot\test\utils.ps1") if ($requireResourceModule) @@ -95,4 +95,4 @@ try } } -Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file +Write-Host -ForegroundColor Green '-------------Done-------------' diff --git a/generated/Monitor/ScheduledQueryRule.Autorest/exports/Get-AzScheduledQueryRule.ps1 b/generated/Monitor/ScheduledQueryRule.Autorest/exports/Get-AzScheduledQueryRule.ps1 index 4a051a847efd..bee1e1c98144 100644 --- a/generated/Monitor/ScheduledQueryRule.Autorest/exports/Get-AzScheduledQueryRule.ps1 +++ b/generated/Monitor/ScheduledQueryRule.Autorest/exports/Get-AzScheduledQueryRule.ps1 @@ -138,8 +138,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/ScheduledQueryRule.Autorest/exports/New-AzScheduledQueryRule.ps1 b/generated/Monitor/ScheduledQueryRule.Autorest/exports/New-AzScheduledQueryRule.ps1 index ba287756b762..b01b9bfc3e8d 100644 --- a/generated/Monitor/ScheduledQueryRule.Autorest/exports/New-AzScheduledQueryRule.ps1 +++ b/generated/Monitor/ScheduledQueryRule.Autorest/exports/New-AzScheduledQueryRule.ps1 @@ -285,8 +285,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/ScheduledQueryRule.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/Monitor/ScheduledQueryRule.Autorest/exports/ProxyCmdletDefinitions.ps1 index 3db7be575590..8db148ad6d2f 100644 --- a/generated/Monitor/ScheduledQueryRule.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/Monitor/ScheduledQueryRule.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -138,8 +138,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -496,8 +495,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -705,8 +703,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1082,8 +1079,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/ScheduledQueryRule.Autorest/exports/Remove-AzScheduledQueryRule.ps1 b/generated/Monitor/ScheduledQueryRule.Autorest/exports/Remove-AzScheduledQueryRule.ps1 index f04b5f0f1249..f54ec7a98566 100644 --- a/generated/Monitor/ScheduledQueryRule.Autorest/exports/Remove-AzScheduledQueryRule.ps1 +++ b/generated/Monitor/ScheduledQueryRule.Autorest/exports/Remove-AzScheduledQueryRule.ps1 @@ -137,8 +137,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/ScheduledQueryRule.Autorest/exports/Update-AzScheduledQueryRule.ps1 b/generated/Monitor/ScheduledQueryRule.Autorest/exports/Update-AzScheduledQueryRule.ps1 index 065271f04069..6e42b8ec712f 100644 --- a/generated/Monitor/ScheduledQueryRule.Autorest/exports/Update-AzScheduledQueryRule.ps1 +++ b/generated/Monitor/ScheduledQueryRule.Autorest/exports/Update-AzScheduledQueryRule.ps1 @@ -306,8 +306,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Monitor/ScheduledQueryRule.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/Monitor/ScheduledQueryRule.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 93c06496c043..f3fcf554f1e4 100644 --- a/generated/Monitor/ScheduledQueryRule.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/Monitor/ScheduledQueryRule.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -218,13 +218,12 @@ public string GetProcessCustomAttributesAtRuntime() private string GetLoginVerification() { - if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + 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}{Indent}throw ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" {Indent}{Indent}}} "; } diff --git a/generated/Storage/Storage.Autorest/exports/Get-AzStorageAccountMigration.ps1 b/generated/Storage/Storage.Autorest/exports/Get-AzStorageAccountMigration.ps1 index 49fa1d98a5ee..a0bee85fa5b7 100644 --- a/generated/Storage/Storage.Autorest/exports/Get-AzStorageAccountMigration.ps1 +++ b/generated/Storage/Storage.Autorest/exports/Get-AzStorageAccountMigration.ps1 @@ -148,8 +148,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Storage/Storage.Autorest/exports/Get-AzStorageFileServiceUsage.ps1 b/generated/Storage/Storage.Autorest/exports/Get-AzStorageFileServiceUsage.ps1 index a1a6c940f16b..a6c8e608e2cb 100644 --- a/generated/Storage/Storage.Autorest/exports/Get-AzStorageFileServiceUsage.ps1 +++ b/generated/Storage/Storage.Autorest/exports/Get-AzStorageFileServiceUsage.ps1 @@ -157,8 +157,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Storage/Storage.Autorest/exports/Get-AzStorageNetworkSecurityPerimeterConfiguration.ps1 b/generated/Storage/Storage.Autorest/exports/Get-AzStorageNetworkSecurityPerimeterConfiguration.ps1 index 0aed2b455ba1..68eca7aa03d9 100644 --- a/generated/Storage/Storage.Autorest/exports/Get-AzStorageNetworkSecurityPerimeterConfiguration.ps1 +++ b/generated/Storage/Storage.Autorest/exports/Get-AzStorageNetworkSecurityPerimeterConfiguration.ps1 @@ -188,8 +188,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Storage/Storage.Autorest/exports/Get-AzStorageSku.ps1 b/generated/Storage/Storage.Autorest/exports/Get-AzStorageSku.ps1 index 91b6290b2ebd..4d858ce31482 100644 --- a/generated/Storage/Storage.Autorest/exports/Get-AzStorageSku.ps1 +++ b/generated/Storage/Storage.Autorest/exports/Get-AzStorageSku.ps1 @@ -101,8 +101,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Storage/Storage.Autorest/exports/Get-AzStorageTaskAssignment.ps1 b/generated/Storage/Storage.Autorest/exports/Get-AzStorageTaskAssignment.ps1 index 95cdb3182920..e2b8a8adb2ea 100644 --- a/generated/Storage/Storage.Autorest/exports/Get-AzStorageTaskAssignment.ps1 +++ b/generated/Storage/Storage.Autorest/exports/Get-AzStorageTaskAssignment.ps1 @@ -196,8 +196,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Storage/Storage.Autorest/exports/Get-AzStorageTaskAssignmentInstancesReport.ps1 b/generated/Storage/Storage.Autorest/exports/Get-AzStorageTaskAssignmentInstancesReport.ps1 index b659c2438b15..8c554a400bdf 100644 --- a/generated/Storage/Storage.Autorest/exports/Get-AzStorageTaskAssignmentInstancesReport.ps1 +++ b/generated/Storage/Storage.Autorest/exports/Get-AzStorageTaskAssignmentInstancesReport.ps1 @@ -202,8 +202,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Storage/Storage.Autorest/exports/Invoke-AzStorageReconcileNetworkSecurityPerimeterConfiguration.ps1 b/generated/Storage/Storage.Autorest/exports/Invoke-AzStorageReconcileNetworkSecurityPerimeterConfiguration.ps1 index 92c5a51333c7..1b2d7dfb542f 100644 --- a/generated/Storage/Storage.Autorest/exports/Invoke-AzStorageReconcileNetworkSecurityPerimeterConfiguration.ps1 +++ b/generated/Storage/Storage.Autorest/exports/Invoke-AzStorageReconcileNetworkSecurityPerimeterConfiguration.ps1 @@ -200,8 +200,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Storage/Storage.Autorest/exports/New-AzStorageTaskAssignment.ps1 b/generated/Storage/Storage.Autorest/exports/New-AzStorageTaskAssignment.ps1 index 0785e21f53b0..269017f27c3d 100644 --- a/generated/Storage/Storage.Autorest/exports/New-AzStorageTaskAssignment.ps1 +++ b/generated/Storage/Storage.Autorest/exports/New-AzStorageTaskAssignment.ps1 @@ -227,8 +227,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Storage/Storage.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/Storage/Storage.Autorest/exports/ProxyCmdletDefinitions.ps1 index 2b747291274e..8e7fa91c2681 100644 --- a/generated/Storage/Storage.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/Storage/Storage.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -148,8 +148,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -376,8 +375,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -636,8 +634,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -810,8 +807,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1082,8 +1078,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1351,8 +1346,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1624,8 +1618,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1923,8 +1916,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2195,8 +2187,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2541,8 +2532,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2840,8 +2830,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Storage/Storage.Autorest/exports/Remove-AzStorageTaskAssignment.ps1 b/generated/Storage/Storage.Autorest/exports/Remove-AzStorageTaskAssignment.ps1 index f2258c6a5965..512b81f0e898 100644 --- a/generated/Storage/Storage.Autorest/exports/Remove-AzStorageTaskAssignment.ps1 +++ b/generated/Storage/Storage.Autorest/exports/Remove-AzStorageTaskAssignment.ps1 @@ -202,8 +202,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Storage/Storage.Autorest/exports/Start-AzStorageAccountMigration.ps1 b/generated/Storage/Storage.Autorest/exports/Start-AzStorageAccountMigration.ps1 index c9e2e6994701..cc61f5dcb091 100644 --- a/generated/Storage/Storage.Autorest/exports/Start-AzStorageAccountMigration.ps1 +++ b/generated/Storage/Storage.Autorest/exports/Start-AzStorageAccountMigration.ps1 @@ -227,8 +227,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Storage/Storage.Autorest/exports/Update-AzStorageTaskAssignment.ps1 b/generated/Storage/Storage.Autorest/exports/Update-AzStorageTaskAssignment.ps1 index fc3d2f73abdd..f9dc2c34b8a4 100644 --- a/generated/Storage/Storage.Autorest/exports/Update-AzStorageTaskAssignment.ps1 +++ b/generated/Storage/Storage.Autorest/exports/Update-AzStorageTaskAssignment.ps1 @@ -274,8 +274,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/Storage/Storage.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/Storage/Storage.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 012af7d22ea3..e9c765d8a382 100644 --- a/generated/Storage/Storage.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/Storage/Storage.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -218,13 +218,12 @@ public string GetProcessCustomAttributesAtRuntime() private string GetLoginVerification() { - if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + 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}{Indent}throw ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" {Indent}{Indent}}} "; }